Update the cache when renaming even if we dont emit hooks
This commit is contained in:
parent
55142186de
commit
8c9f1a982c
|
@ -155,7 +155,7 @@ class Root extends Folder implements IRootFolder {
|
|||
* @param string $path
|
||||
* @throws \OCP\Files\NotFoundException
|
||||
* @throws \OCP\Files\NotPermittedException
|
||||
* @return string
|
||||
* @return \OCP\Files\Node
|
||||
*/
|
||||
public function get($path) {
|
||||
$path = $this->normalizePath($path);
|
||||
|
|
|
@ -537,8 +537,9 @@ class View {
|
|||
if ($this->shouldEmitHooks()) {
|
||||
$this->emit_file_hooks_post($exists, $path2);
|
||||
}
|
||||
} elseif ($this->shouldEmitHooks() && $result !== false) {
|
||||
} elseif ($result !== false) {
|
||||
$this->updater->rename($path1, $path2);
|
||||
if ($this->shouldEmitHooks($path1) and $this->shouldEmitHooks($path2)) {
|
||||
\OC_Hook::emit(
|
||||
Filesystem::CLASSNAME,
|
||||
Filesystem::signal_post_rename,
|
||||
|
@ -548,6 +549,7 @@ class View {
|
|||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1315,7 +1317,7 @@ class View {
|
|||
$maxLen = min(PHP_MAXPATHLEN, 4000);
|
||||
// Check for the string length - performed using isset() instead of strlen()
|
||||
// because isset() is about 5x-40x faster.
|
||||
if(isset($path[$maxLen])) {
|
||||
if (isset($path[$maxLen])) {
|
||||
$pathLen = strlen($path);
|
||||
throw new \OCP\Files\InvalidPathException("Path length($pathLen) exceeds max path length($maxLen): $path");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue