summaryrefslogtreecommitdiffstats
path: root/lib/private/updater.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-20 11:31:28 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-20 11:31:28 +0100
commit36c0f08ec0c5327f9b38f1078ee0d6ef8823b8da (patch)
treef87533f1a2338101b9b37067071109c9b89dc7c3 /lib/private/updater.php
parent970878b5815da97df517688b811265531c7e152f (diff)
parent082c4cda50c6dbb9ba9ca96c641f0db1eeb7ff1a (diff)
downloadnextcloud-server-36c0f08ec0c5327f9b38f1078ee0d6ef8823b8da.tar.gz
nextcloud-server-36c0f08ec0c5327f9b38f1078ee0d6ef8823b8da.zip
Merge pull request #7732 from owncloud/datafolderexistence
Added .ocdata file to check for data folder validity
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r--lib/private/updater.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 1354f3fd2f8..18864c17ec9 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -102,6 +102,11 @@ class Updater extends BasicEmitter {
}
$this->emit('\OC\Updater', 'maintenanceStart');
+ // create empty file in data dir, so we can later find
+ // out that this is indeed an ownCloud data directory
+ // (in case it didn't exist before)
+ file_put_contents(\OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
+
/*
* START CONFIG CHANGES FOR OLDER VERSIONS
*/