Skip to content
Snippets Groups Projects
Commit 2d2af90f authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #6028 from owncloud/extstorage-touchoperationreturnvalue

Fixed ext storage touch function to return true on success
parents de2b4440 d88025bf
No related merge requests found
...@@ -269,7 +269,11 @@ class Dropbox extends \OC\Files\Storage\Common { ...@@ -269,7 +269,11 @@ class Dropbox extends \OC\Files\Storage\Common {
} }
public function touch($path, $mtime = null) { public function touch($path, $mtime = null) {
if ($this->file_exists($path)) {
return false; return false;
} else {
$this->file_put_contents($path, '');
}
} }
} }
...@@ -364,7 +364,7 @@ class Swift extends \OC\Files\Storage\Common { ...@@ -364,7 +364,7 @@ class Swift extends \OC\Files\Storage\Common {
'X-Object-Meta-Timestamp' => $mtime 'X-Object-Meta-Timestamp' => $mtime
) )
); );
$object->Update($settings); return $object->Update($settings);
} else { } else {
$object = $this->container->DataObject(); $object = $this->container->DataObject();
if (is_null($mtime)) { if (is_null($mtime)) {
...@@ -377,7 +377,7 @@ class Swift extends \OC\Files\Storage\Common { ...@@ -377,7 +377,7 @@ class Swift extends \OC\Files\Storage\Common {
'X-Object-Meta-Timestamp' => $mtime 'X-Object-Meta-Timestamp' => $mtime
) )
); );
$object->Create($settings); return $object->Create($settings);
} }
} }
......
...@@ -234,6 +234,7 @@ class DAV extends \OC\Files\Storage\Common{ ...@@ -234,6 +234,7 @@ class DAV extends \OC\Files\Storage\Common{
} else { } else {
$this->file_put_contents($path, ''); $this->file_put_contents($path, '');
} }
return true;
} }
public function getFile($path, $target) { public function getFile($path, $target) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment