From: Robin Appelman Date: Fri, 13 Jan 2012 19:05:44 +0000 (+0100) Subject: remove temporary files after updating X-Git-Tag: v3.0~59^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7d53b6f106fe7e6f0c56820ea18da4ac270b27a8;p=nextcloud-server.git remove temporary files after updating --- diff --git a/lib/db.php b/lib/db.php index b901cc8b513..f6eddf7825c 100644 --- a/lib/db.php +++ b/lib/db.php @@ -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);