aboutsummaryrefslogtreecommitdiffstats
path: root/lib/filesystem.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-09-28 18:47:54 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-09-28 18:50:36 +0200
commit35357f3afb90dec1d0a9755ab0e0504a916c5e5a (patch)
treec1b2244ce17418ef018a165b508506d17c9ad9fd /lib/filesystem.php
parentf8f73e267550a46dc4cee5b025e83d786cddb1bb (diff)
downloadnextcloud-server-35357f3afb90dec1d0a9755ab0e0504a916c5e5a.tar.gz
nextcloud-server-35357f3afb90dec1d0a9755ab0e0504a916c5e5a.zip
etag has to be removed after version rollback to enable the sync client to detect the changes (bug #1829)
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r--lib/filesystem.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index f5c10923b32..5516aae3976 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -521,12 +521,19 @@ class OC_Filesystem{
return self::$defaultInstance->hasUpdated($path,$time);
}
- static public function removeETagHook($params) {
+ static public function removeETagHook($params, $root = false) {
if (isset($params['path'])) {
$path=$params['path'];
} else {
$path=$params['oldpath'];
}
+
+ if (root) { // reduce path to the required part of it (no 'username/files')
+ $fakeRootView = new OC_FilesystemView($root);
+ $count = 1;
+ $path=str_replace(OC_App::getStorage("files")->getAbsolutePath(), "", $fakeRootView->getAbsolutePath($path), $count);
+ }
+
$path = self::normalizePath($path);
OC_Connector_Sabre_Node::removeETagPropertyForPath($path);
}