summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-21 15:00:28 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-21 15:00:28 +0200
commit2628601e79b8bebfdd6b1a03ef915ca9b1bd629a (patch)
tree4cadff9537a1753b35140318129d05e832dd87d0 /lib
parent3cb666ad7732cd2bff5cc172e40d1b22407aa640 (diff)
downloadnextcloud-server-2628601e79b8bebfdd6b1a03ef915ca9b1bd629a.tar.gz
nextcloud-server-2628601e79b8bebfdd6b1a03ef915ca9b1bd629a.zip
adding oc-mtime handling to chunked upload
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/file.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 85b67e65871..8621b7f3689 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -238,6 +238,15 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
$fs->unlink($targetPath);
throw new Sabre_DAV_Exception();
}
+
+ // allow sync clients to send the mtime along in a header
+ $mtime = OC_Request::hasModificationTime();
+ if ($mtime !== false) {
+ if($fs->touch($this->path, $mtime)) {
+ header('X-OC-MTime: accepted');
+ }
+ }
+
return OC_Connector_Sabre_Node::getETagPropertyForPath($targetPath);
}