]> source.dussan.org Git - nextcloud-server.git/commitdiff
rename a file if it gets restored so that it no longer exists as a version. Otherwise...
authorBjörn Schießle <schiessle@owncloud.com>
Wed, 8 May 2013 14:32:29 +0000 (16:32 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Wed, 8 May 2013 21:00:13 +0000 (23:00 +0200)
apps/files_versions/lib/versions.php

index 836e3914dc0705941d89bc655606098e3a9e03a1..5fdbef27743b8f719ef4971104e69be6fb72670e 100644 (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;