Fix setup crash on upgrade when env-production / data/cache-production have been deleted (missing dict files)

This commit is contained in:
Molkobain
2021-10-21 15:13:48 +02:00
parent ed43d00afe
commit ef9c18e393
2 changed files with 12 additions and 1 deletions

View File

@@ -1319,6 +1319,16 @@ class utils
return Session::Get('itop_env', ITOP_DEFAULT_ENV);
}
/**
* @return string Absolute path to the folder into which the current environment has been compiled.
* The corresponding folder is created or cleaned upon code compilation
* @since 3.0.0
*/
public static function GetCompiledEnvironmentPath(): string
{
return APPROOT . 'env-' . MetaModel::GetEnvironment() . '/';
}
/**
* @return string A path to a folder into which any module can store cache data
* The corresponding folder is created or cleaned upon code compilation
@@ -1327,6 +1337,7 @@ class utils
{
return APPROOT.'data/cache-'.MetaModel::GetEnvironment().'/';
}
/**
* @return string A path to a folder into which any module can store log
* @since 2.7.0