Skip to content
Snippets Groups Projects
Unverified Commit bac8e133 authored by Vincent Petry's avatar Vincent Petry
Browse files

Remove unneeded unsets in encoding wrapper

parent e8d08220
No related branches found
No related tags found
No related merge requests found
......@@ -334,12 +334,7 @@ class Encoding extends Wrapper {
*/
public function rename($path1, $path2) {
// second name always NFC
$result = $this->storage->rename($this->findPathToUse($path1), $this->findPathToUse($path2));
if ($result) {
unset($this->namesCache[$path1]);
unset($this->namesCache[$path2]);
}
return $result;
return $this->storage->rename($this->findPathToUse($path1), $this->findPathToUse($path2));
}
/**
......@@ -350,11 +345,7 @@ class Encoding extends Wrapper {
* @return bool
*/
public function copy($path1, $path2) {
$result = $this->storage->copy($this->findPathToUse($path1), $this->findPathToUse($path2));
if ($result) {
unset($this->namesCache[$path2]);
}
return $result;
return $this->storage->copy($this->findPathToUse($path1), $this->findPathToUse($path2));
}
/**
......@@ -424,11 +415,7 @@ class Encoding extends Wrapper {
* @return bool
*/
public function touch($path, $mtime = null) {
$result = $this->storage->touch($this->findPathToUse($path), $mtime);
if ($result) {
unset($this->namesCache[$path]);
}
return $result;
return $this->storage->touch($this->findPathToUse($path), $mtime);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment