Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-30 16:50:36 +0400
committerLukas Reschke <lukas@statuscode.ch>2012-10-30 16:50:42 +0400
commitc73eb29b6e4acd32914f12afd94122f1ca4647bf (patch)
treed41a4d3ab83521bb75a828bc36a593a22f76660c /lib
parentb78b9890b1bb87235657365ce3fe0b818e8a32bc (diff)
Backport of ad720c4 for oC 4.x
Fixes #145
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 26e8579f6f1..3c4b313fe33 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -437,6 +437,11 @@ class OC_Util {
// creating a test file
$testfile = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$filename;
+
+ if(file_exists($testfile)){// already running this test, possible recursive call
+ return false;
+ }
+
$fp = @fopen($testfile, 'w');
@fwrite($fp, $testcontent);
@fclose($fp);