diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-15 11:37:47 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-15 11:37:47 +0100 |
commit | 76fa7bab63190ac363222f7e3653ca04e14dab65 (patch) | |
tree | 0f0bdb72e35f64b454fe6f33f60957db8a477188 /apps/files_versions | |
parent | 34559ef11428c9a2a1b83f8a63d650d1fa0be49e (diff) | |
download | nextcloud-server-76fa7bab63190ac363222f7e3653ca04e14dab65.tar.gz nextcloud-server-76fa7bab63190ac363222f7e3653ca04e14dab65.zip |
call getFileInfo to enforce a file cache entry for the new version, fix #6286
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/lib/versions.php | 6 |
1 files 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; |