diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-21 15:00:28 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-21 15:00:28 +0200 |
commit | 2628601e79b8bebfdd6b1a03ef915ca9b1bd629a (patch) | |
tree | 4cadff9537a1753b35140318129d05e832dd87d0 /lib | |
parent | 3cb666ad7732cd2bff5cc172e40d1b22407aa640 (diff) | |
download | nextcloud-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.php | 9 |
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); } |