Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-01-15 14:37:47 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2014-01-15 19:01:48 +0400
commitafe35ca12d486d1a7527eee800f09cdd22466649 (patch)
treeeaab83e4199c881257f9d23c22b4acc02570d75d /apps/files_versions
parenta83e37c799af7cff57f0e335604ffc450bf2f004 (diff)
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.php6
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;