From 76fa7bab63190ac363222f7e3653ca04e14dab65 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 15 Jan 2014 11:37:47 +0100 Subject: [PATCH] call getFileInfo to enforce a file cache entry for the new version, fix #6286 --- apps/files_versions/lib/versions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.5