diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-02-10 14:16:45 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-02-10 14:16:45 +0100 |
commit | 1263511a179fb1508f41207d61d76739e087b239 (patch) | |
tree | c8d848e174f6ff0f14971ae81f95663aa17e8af7 /lib/connector/sabre/file.php | |
parent | 1c56539c01c162676a05d90e3598b7d68394ac73 (diff) | |
download | nextcloud-server-1263511a179fb1508f41207d61d76739e087b239.tar.gz nextcloud-server-1263511a179fb1508f41207d61d76739e087b239.zip |
append .part to put files
Diffstat (limited to 'lib/connector/sabre/file.php')
-rw-r--r-- | lib/connector/sabre/file.php | 8 |
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); } |