summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2012-01-13 20:05:44 +0100
committerRobin Appelman <icewind1991@gmail.com>2012-01-13 20:05:44 +0100
commit7d53b6f106fe7e6f0c56820ea18da4ac270b27a8 (patch)
treefaf7385a8145255a295afa73112ddda6232746a6 /lib/db.php
parent6e0ea7aaaef50b7d7a48477995094da7aa745e4a (diff)
downloadnextcloud-server-7d53b6f106fe7e6f0c56820ea18da4ac270b27a8.tar.gz
nextcloud-server-7d53b6f106fe7e6f0c56820ea18da4ac270b27a8.zip
remove temporary files after updating
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php4
1 files changed, 4 insertions, 0 deletions
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);