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)
This commit is contained in:
parent
b82146eeee
commit
d88025bf6b
|
@ -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, '');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -234,6 +234,7 @@ class DAV extends \OC\Files\Storage\Common{
|
|||
} else {
|
||||
$this->file_put_contents($path, '');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getFile($path, $target) {
|
||||
|
|
Loading…
Reference in New Issue