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:
commit
c04a494ea7
1 changed files with 13 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue