diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-09-28 18:47:54 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-09-28 18:50:36 +0200 |
commit | 35357f3afb90dec1d0a9755ab0e0504a916c5e5a (patch) | |
tree | c1b2244ce17418ef018a165b508506d17c9ad9fd /lib/filesystem.php | |
parent | f8f73e267550a46dc4cee5b025e83d786cddb1bb (diff) | |
download | nextcloud-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.php | 9 |
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); } |