summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/index.php b/index.php
index 6ef215ab..dbd17149 100644
--- a/index.php
+++ b/index.php
@@ -64,9 +64,11 @@ if (PHP_SAPI == "cli") {
case "test":
array_splice($_SERVER["argv"], 1, 1, "gallery_unit_test");
define("TEST_MODE", 1);
- @mkdir("test/var/logs", 0777, true);
define("VARPATH", realpath("test/var") . "/");
- @copy("var/database.php", VARPATH . "database.php");
+ if (!is_dir("test/var/logs")) {
+ @mkdir("test/var/logs", 0777, true);
+ @copy("var/database.php", VARPATH . "database.php");
+ }
break;
default: