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);