Merge pull request #6064 from nextcloud/fix-5219-absolute-path-must-be-relative-to-files-on-theming-update

Still throw a locked exception when the path is not relative to $user/files/
This commit is contained in:
Morris Jobke 2017-09-04 14:05:34 +02:00 committed by GitHub
commit c04a494ea7
1 changed files with 13 additions and 6 deletions

View File

@ -1941,11 +1941,18 @@ class View {
);
}
} catch (\OCP\Lock\LockedException $e) {
// rethrow with the a human-readable path
throw new \OCP\Lock\LockedException(
$this->getPathRelativeToFiles($absolutePath),
$e
);
try {
// rethrow with the a human-readable path
throw new \OCP\Lock\LockedException(
$this->getPathRelativeToFiles($absolutePath),
$e
);
} catch (\InvalidArgumentException $e) {
throw new \OCP\Lock\LockedException(
$absolutePath,
$e
);
}
}
}
@ -2050,7 +2057,7 @@ class View {
return ($pathSegments[2] === 'files') && (count($pathSegments) > 3);
}
return true;
return strpos($path, '/appdata_') !== 0;
}
/**