summaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connector/sabre')
-rw-r--r--lib/connector/sabre/file.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index 1c18a391742..521c5f0571d 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -45,7 +45,13 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function put($data) {
- \OC\Files\Filesystem::file_put_contents($this->path,$data);
+ // mark file as partial while uploading (ignored by the scanner)
+ $partpath = $this->path . '.part';
+
+ \OC\Files\Filesystem::file_put_contents($partpath, $data);
+
+ // rename to correct path
+ \OC\Files\Filesystem::rename($partpath, $this->path);
return OC_Connector_Sabre_Node::getETagPropertyForPath($this->path);
}