From 1263511a179fb1508f41207d61d76739e087b239 Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Sun, 10 Feb 2013 14:16:45 +0100 Subject: append .part to put files --- lib/connector/sabre/file.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/connector/sabre') 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); } -- cgit v1.2.3