Don't try to touch after rename

This commit is contained in:
bohwaz 2023-12-31 16:23:09 +01:00
parent 11e0b63bf3
commit f9ae56c3b0
2 changed files with 4 additions and 2 deletions

View file

@ -451,7 +451,7 @@ class Server
}
if (!isset($file['content']) && !isset($file['resource']) && !isset($file['path'])) {
throw new \RuntimeException('Invalid file array returned by ::get()');
throw new \RuntimeException('Invalid file array returned by ::get(): ' . print_r($file, true));
}
$this->extendExecutionTime();

View file

@ -417,11 +417,13 @@ class Storage extends AbstractStorage implements TrashInterface
}
else {
$method($source, $target);
touch($target, filemtime($source));
if ($method === 'rename') {
$this->getResourceProperties($uri)->move($destination);
}
else {
touch($target, filemtime($source));
}
}
return $overwritten;