Commit 50f85bfd authored by Joas Schilling's avatar Joas Schilling
Browse files

Check whether file exists before trying to touch() it

Local changes from d069ee8a
and 258ad38f
parent c5427da7
......@@ -159,6 +159,9 @@ class MappedLocal extends \OC\Files\Storage\Common {
// sets the modification time of the file to the given value.
// If mtime is nil the current time is set.
// note that the access time of the file always changes to the current time.
if ($this->file_exists($path) and !$this->isUpdatable($path)) {
return false;
}
if (!is_null($mtime)) {
$result = touch($this->getSourcePath($path), $mtime);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment