summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-10 10:31:26 +0200
committerLukas Reschke <lukas@owncloud.com>2014-09-10 10:31:26 +0200
commit95eb9bf8aef0922eedad331b440903e0044ee3aa (patch)
tree139e10ed91479f8b7f6b3b8f95739a5d15271738
parent8e89c51e8744ecbfc5e2afe59f030c5b5dce62a6 (diff)
parent7bd4f6cac59b73cb7c14c057d6ee66d04c5c1a28 (diff)
downloadnextcloud-server-95eb9bf8aef0922eedad331b440903e0044ee3aa.tar.gz
nextcloud-server-95eb9bf8aef0922eedad331b440903e0044ee3aa.zip
Merge pull request #10884 from owncloud/stable7_backport_issue_10674
Backport issue 10764
-rw-r--r--lib/private/files/view.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 44e44adfd2e..baf765d4070 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -304,7 +304,13 @@ class View {
$hooks[] = 'write';
}
$result = $this->basicOperation('touch', $path, $hooks, $mtime);
- if (!$result) { //if native touch fails, we emulate it by changing the mtime in the cache
+ if (!$result) {
+ // If create file fails because of permissions on external storage like SMB folders,
+ // check file exists and return false if not.
+ if(!$this->file_exists($path)){
+ return false;
+ }
+ //if native touch fails, we emulate it by changing the mtime in the cache
$this->putFileInfo($path, array('mtime' => $mtime));
}
return true;