Check whether file exists before trying to touch() it

Local changes from d069ee8a8b
and 258ad38fd3
This commit is contained in:
Joas Schilling 2014-11-27 11:45:03 +01:00
parent c5427da76d
commit 50f85bfd1f

View File

@ -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 {