adding oc-mtime handling to chunked upload

remotes/origin/stable6
Thomas Müller 2013-10-21 15:00:28 +07:00
parent 3cb666ad77
commit 2628601e79
1 changed files with 9 additions and 0 deletions

@ -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);
}