]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check whether file exists before trying to touch() it
authorJoas Schilling <nickvergessen@gmx.de>
Thu, 27 Nov 2014 10:45:03 +0000 (11:45 +0100)
committerJoas Schilling <nickvergessen@gmx.de>
Thu, 27 Nov 2014 13:59:09 +0000 (14:59 +0100)
Local changes from d069ee8a8bce6a08d8b7921ad378c60af2a0439e
and 258ad38fd3c1e3cdc4ec20238b166e78c334b814

lib/private/files/storage/mappedlocal.php

index e1d234dda1353ce1588797a9695d478279db548e..f7d448d14a1ac5a080a971f4dd667d31738a4a5e 100644 (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 {