]> source.dussan.org Git - nextcloud-server.git/commitdiff
only remove old sqlite database if it exists
authorRobin Appelman <icewind1991@gmail.com>
Wed, 20 Jul 2011 22:52:48 +0000 (00:52 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Wed, 20 Jul 2011 22:52:48 +0000 (00:52 +0200)
lib/setup.php

index 1a33209ec57a604ac17386c410045a666d921150..63ba4daab546e11f32b1ce74449e1b5b1c683723 100644 (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');
                        }