diff --git a/base/main.php b/base/main.php index dc9445e..156bc25 100644 --- a/base/main.php +++ b/base/main.php @@ -989,7 +989,7 @@ if(!function_exists('output')){ if(!function_exists('is_git_repo')){ function is_git_repo(){ - return boolval( find_git_repo(dirname(__FILE__)) ); + return boolval( find_git_repo(getcwd().DIRECTORY_SEPARATOR.".git") ); } } @@ -997,8 +997,6 @@ if(!function_exists('find_git_repo')){ function find_git_repo($path){ if(dirname($path) == DIRECTORY_SEPARATOR){ return false; - }else if( is_dir(getcwd().DIRECTORY_SEPARATOR.".git") ){ - return getcwd().DIRECTORY_SEPARATOR.".git"; }else if(is_dir(dirname($path).DIRECTORY_SEPARATOR.".git")){ return dirname($path).DIRECTORY_SEPARATOR.".git"; }else{