File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,11 +50,23 @@ static String SolvePackageDestination(const std::string& packageDestination)
5050}
5151static String GetPackageDatabasePath ()
5252{
53+ // Get Package Database Path
54+ String pkgDatabasePath;
5355 if (GetPackageRepositoryPath (false ).contains (jenova::GlobalSettings::JenovaPackageRepositoryPath))
5456 {
55- return jenova::GetJenovaProjectDirectory () + " Jenova/" + jenova::GlobalSettings::JenovaInstalledPackagesFile;
57+ pkgDatabasePath = jenova::GetJenovaProjectDirectory () + " Jenova/" + jenova::GlobalSettings::JenovaInstalledPackagesFile;
5658 }
57- return GetPackageRepositoryPath (true ) + jenova::GlobalSettings::JenovaInstalledPackagesFile;
59+ else
60+ {
61+ pkgDatabasePath = GetPackageRepositoryPath (true ) + jenova::GlobalSettings::JenovaInstalledPackagesFile;
62+ }
63+
64+ // Ensure Package Database Path Exists
65+ filesystem::path dir = filesystem::path (AS_STD_STRING (pkgDatabasePath)).parent_path ();
66+ if (!filesystem::exists (dir)) filesystem::create_directories (dir);
67+
68+ // All Good
69+ return pkgDatabasePath;
5870}
5971
6072// Configuration
You can’t perform that action at this time.
0 commit comments