From: Bjoern Schiessle Date: Wed, 15 Jan 2014 10:37:47 +0000 (+0100) Subject: call getFileInfo to enforce a file cache entry for the new version, fix #6286 X-Git-Tag: v7.0.0alpha2~931^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=76fa7bab63190ac363222f7e3653ca04e14dab65;p=nextcloud-server.git call getFileInfo to enforce a file cache entry for the new version, fix #6286 --- diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 42a15612d67..7e6cc818efb 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -98,7 +98,6 @@ class Storage { $files_view = new \OC\Files\View('/'.$uid .'/files'); $users_view = new \OC\Files\View('/'.$uid); - $versions_view = new \OC\Files\View('/'.$uid.'/files_versions'); // check if filename is a directory if($files_view->is_dir($filename)) { @@ -132,7 +131,10 @@ class Storage { \OC_FileProxy::$enabled = false; // store a new version of a file - $users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename)); + $mtime = $users_view->filemtime('files'.$filename); + $users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'. $mtime); + // call getFileInfo to enforce a file cache entry for the new version + $users_view->getFileInfo('files_versions'.$filename.'.v'.$mtime); // reset proxy state \OC_FileProxy::$enabled = $proxyStatus;