Преглед изворни кода

added check for project path

Piotr Labudda пре 8 година
родитељ
комит
0ec4192190
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      SE/se-lib/Config.php

+ 3 - 1
SE/se-lib/Config.php

@@ -143,7 +143,9 @@ class Config {
 	public static function getProjectPath() {
 		$activeProject = self::getProjectName();
 		if (!$activeProject) return null;
-		return APP_PATH_ROOT . DS . "projects" . DS . "{$activeProject}";
+		$path = APP_PATH_ROOT . DS . "projects" . DS . "{$activeProject}";
+		if (!file_exists($path)) throw new Exception("Missing project folder '{$activeProject}'");
+		return $path;
 	}
 
 }