From 50f85bfd1f0856cd8a3446570d6de4c234685bf6 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 27 Nov 2014 11:45:03 +0100 Subject: [PATCH] Check whether file exists before trying to touch() it Local changes from d069ee8a8bce6a08d8b7921ad378c60af2a0439e and 258ad38fd3c1e3cdc4ec20238b166e78c334b814 --- lib/private/files/storage/mappedlocal.php | 3 +++ 1 file changed, 3 insertions(+) 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 { -- 2.39.5