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
|
@ -1941,11 +1941,18 @@ class View {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (\OCP\Lock\LockedException $e) {
|
} catch (\OCP\Lock\LockedException $e) {
|
||||||
// rethrow with the a human-readable path
|
try {
|
||||||
throw new \OCP\Lock\LockedException(
|
// rethrow with the a human-readable path
|
||||||
$this->getPathRelativeToFiles($absolutePath),
|
throw new \OCP\Lock\LockedException(
|
||||||
$e
|
$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 ($pathSegments[2] === 'files') && (count($pathSegments) > 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return strpos($path, '/appdata_') !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue