From: Robin Appelman Date: Wed, 20 Jul 2011 22:52:48 +0000 (+0200) Subject: only remove old sqlite database if it exists X-Git-Tag: v3.0~267^2~391 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8eefd42a7dc537ebf28e2a3827e01c42b266dcd1;p=nextcloud-server.git only remove old sqlite database if it exists --- diff --git a/lib/setup.php b/lib/setup.php index 1a33209ec57..63ba4daab54 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -131,7 +131,9 @@ class OC_SETUP { } else { //delete the old sqlite database first, might cause infinte loops otherwise - unlink("$datadir/owncloud.db"); + if(file_exists("$datadir/owncloud.db")){ + unlink("$datadir/owncloud.db"); + } //in case of sqlite, we can always fill the database OC_DB::createDbFromStructure('db_structure.xml'); }