diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-05-08 16:32:29 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-05-08 23:00:13 +0200 |
commit | bda8187f3b305d0d1d7843bb9eaf0074ae5009d4 (patch) | |
tree | a088ef7b8ac665f0880b5c43933f203844e87682 /apps/files_versions | |
parent | 0e30e68b22bf3db2872dcff50fe1c0186aa1c57e (diff) | |
download | nextcloud-server-bda8187f3b305d0d1d7843bb9eaf0074ae5009d4.tar.gz nextcloud-server-bda8187f3b305d0d1d7843bb9eaf0074ae5009d4.zip |
rename a file if it gets restored so that it no longer exists as a version. Otherwise it can happen that the expire() function removes all other versions so that we end up with only one version which is exactly the same as the original file
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/lib/versions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 836e3914dc0..5fdbef27743 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -200,7 +200,7 @@ class Storage { } // rollback - if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) { + if( @$users_view->rename('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) { $files_view->touch($file, $revision); Storage::expire($file); return true; |