only remove old sqlite database if it exists

This commit is contained in:
Robin Appelman 2011-07-21 00:52:48 +02:00
parent 15c1a8109b
commit 8eefd42a7d

View file

@ -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');
}