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

This commit is contained in:
Björn Schießle 2013-05-08 16:32:29 +02:00
parent 0e30e68b22
commit bda8187f3b
1 changed files with 1 additions and 1 deletions

View File

@ -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;