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

remotes/origin/stable6
Björn Schießle 12 years ago
parent 0e30e68b22
commit bda8187f3b
  1. 2
      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;

Loading…
Cancel
Save