Fixed write test for main directory during install.
[fa-stable.git] / includes / main.inc
index 8f2b3c33d56ea3912b97e3579d6b9488b45c9aa4..e6b7f9f8a48ed4b096610adc5b2e15ca19281f4e 100644 (file)
@@ -256,9 +256,9 @@ function check_write($path)
 {
        if ($path == ''//|| $path == '.' || $path == '..'
        ) return 0;
-       
+
        return is_writable($path) ? (is_dir($path) ? 1 : -1) 
-               : (is_file($path) ? 0 : ($path == '.' ? 0 : check_write(dirname($path))));
+               : (is_file($path) ? 0 : ($path == '.' || $path == '..' ? 0 : check_write(dirname($path))));
 }
 
 /*