diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-11-27 11:45:03 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-11-27 14:59:09 +0100 |
commit | 50f85bfd1f0856cd8a3446570d6de4c234685bf6 (patch) | |
tree | bec029603c414355962ca5453ce26d08700f40f4 /lib/private | |
parent | c5427da76d6d01fe9967204d3c019b493ceae6b9 (diff) | |
download | nextcloud-server-50f85bfd1f0856cd8a3446570d6de4c234685bf6.tar.gz nextcloud-server-50f85bfd1f0856cd8a3446570d6de4c234685bf6.zip |
Check whether file exists before trying to touch() it
Local changes from d069ee8a8bce6a08d8b7921ad378c60af2a0439e
and 258ad38fd3c1e3cdc4ec20238b166e78c334b814
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/storage/mappedlocal.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php index e1d234dda13..f7d448d14a1 100644 --- a/lib/private/files/storage/mappedlocal.php +++ b/lib/private/files/storage/mappedlocal.php @@ -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 { |