summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-25 12:44:27 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-25 12:44:27 +0100
commitd88025bf6b1d8b146605da6c518c4af9624394a4 (patch)
tree999e57691e920e1cd8996a43cc302f997ebf2385 /apps
parentb82146eeee2c969a53dd42cebf06ecfd31a0e286 (diff)
downloadnextcloud-server-d88025bf6b1d8b146605da6c518c4af9624394a4.tar.gz
nextcloud-server-d88025bf6b1d8b146605da6c518c4af9624394a4.zip
Fixed ext storage touch function to return true on success
Some ext storage impl didn't return true on success. Fixes #5943 (Dropbox) Fixes #6010 (WebDAV)
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_external/lib/dropbox.php6
-rw-r--r--apps/files_external/lib/swift.php4
-rw-r--r--apps/files_external/lib/webdav.php1
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) {