From bda8187f3b305d0d1d7843bb9eaf0074ae5009d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 8 May 2013 16:32:29 +0200 Subject: [PATCH] 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 --- apps/files_versions/lib/versions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5