diff options
author | Jesus Macias Portela <jesus.macias.portela@gmail.com> | 2014-09-04 17:29:08 +0200 |
---|---|---|
committer | Jesus Macias Portela <jesus.macias.portela@gmail.com> | 2014-09-04 17:29:08 +0200 |
commit | 523680cef2f7280de40d215dd2805c0dad5ba86e (patch) | |
tree | 3ce9e50a14372baa503913d2699101383fb6b7cc /lib | |
parent | 1a7df3323391f6d6f7ef04de2687b3a566ab6351 (diff) | |
parent | 00a878880f386788aaef59b91095fc1bcb0f7888 (diff) | |
download | nextcloud-server-523680cef2f7280de40d215dd2805c0dad5ba86e.tar.gz nextcloud-server-523680cef2f7280de40d215dd2805c0dad5ba86e.zip |
Merge pull request #10840 from owncloud/issue_10674
Solve bug with touch always return true on /lib/private/files/view.php
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/view.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index d310a0fa4e1..f97f846bb5a 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; |