]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove temporary files after updating
authorRobin Appelman <icewind1991@gmail.com>
Fri, 13 Jan 2012 19:05:44 +0000 (20:05 +0100)
committerRobin Appelman <icewind1991@gmail.com>
Fri, 13 Jan 2012 19:05:44 +0000 (20:05 +0100)
lib/db.php

index b901cc8b513bedd4980cf02a02a5c2a9c6cd82b3..f6eddf7825cb4d4e7007a8f97e9e71d3fa554d7d 100644 (file)
@@ -371,6 +371,10 @@ class OC_DB {
                }
                file_put_contents( $file2, $content );
                $op = self::$schema->updateDatabase($file2, $previousSchema, array(), false);
+               
+               // Delete our temporary file
+               unlink( $file2 );
+               
                if (PEAR::isError($op)) {
                    $error = $op->getMessage();
                    OC_Log::write('core','Failed to update database structure ('.$error.')',OC_Log::FATAL);