Skip to content
Snippets Groups Projects
Commit da892d69 authored by Björn Schießle's avatar Björn Schießle
Browse files

if the file doesn't exists; create a new one. We use this to create new text...

if the file doesn't exists; create a new one. We use this to create new text files in the web interface
parent 01f3f8e0
Branches
No related tags found
No related merge requests found
...@@ -234,7 +234,13 @@ class DAV extends \OC\Files\Storage\Common{ ...@@ -234,7 +234,13 @@ class DAV extends \OC\Files\Storage\Common{
$mtime=time(); $mtime=time();
} }
$path=$this->cleanPath($path); $path=$this->cleanPath($path);
// if file exists, update the mtime, else create a new empty file
if ($this->file_exists($path)) {
$this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime)); $this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime));
} else {
$this->file_put_contents($path, '');
}
} }
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