diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-25 05:08:24 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-25 05:08:24 -0800 |
commit | 2d2af90fce7e1d0dcb88dcb70275a8a1654f3732 (patch) | |
tree | 7ad49112c94978533a2a9340bcf6eed5a373eced | |
parent | de2b4440301badf48e638ede84f64692f2a2db41 (diff) | |
parent | d88025bf6b1d8b146605da6c518c4af9624394a4 (diff) | |
download | nextcloud-server-2d2af90fce7e1d0dcb88dcb70275a8a1654f3732.tar.gz nextcloud-server-2d2af90fce7e1d0dcb88dcb70275a8a1654f3732.zip |
Merge pull request #6028 from owncloud/extstorage-touchoperationreturnvalue
Fixed ext storage touch function to return true on success
-rwxr-xr-x | apps/files_external/lib/dropbox.php | 6 | ||||
-rw-r--r-- | apps/files_external/lib/swift.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/webdav.php | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php index 6e464f4e287..5f603b7fe43 100755 --- a/apps/files_external/lib/dropbox.php +++ b/apps/files_external/lib/dropbox.php @@ -269,7 +269,11 @@ class Dropbox extends \OC\Files\Storage\Common { } public function touch($path, $mtime = null) { - return false; + if ($this->file_exists($path)) { + return false; + } else { + $this->file_put_contents($path, ''); + } } } diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 86938ef3bb9..b615d24ce76 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -364,7 +364,7 @@ class Swift extends \OC\Files\Storage\Common { 'X-Object-Meta-Timestamp' => $mtime ) ); - $object->Update($settings); + return $object->Update($settings); } else { $object = $this->container->DataObject(); if (is_null($mtime)) { @@ -377,7 +377,7 @@ class Swift extends \OC\Files\Storage\Common { 'X-Object-Meta-Timestamp' => $mtime ) ); - $object->Create($settings); + return $object->Create($settings); } } diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 0837222e511..02f6cb5fc4f 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -234,6 +234,7 @@ class DAV extends \OC\Files\Storage\Common{ } else { $this->file_put_contents($path, ''); } + return true; } public function getFile($path, $target) { |