fix about filename path in DEBUG/RELEASE

This commit is contained in:
Michal Buzik 2024-10-29 20:36:13 +01:00
parent 117d6f5162
commit 2a40e2836d
2 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/.idea.tbfDBBackup.iml
/contentModel.xml
/modules.xml
/projectSettingsUpdater.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -266,16 +266,16 @@ void UpdateDb(Configuration dbConfiguration)
string ConfigurationFileNamePath() string ConfigurationFileNamePath()
{ {
string s; string fileNamePath;
#if DEBUG #if DEBUG
Console.WriteLine("-- DEV version of THE PROJECT -- "); Console.WriteLine("-- DEV version of THE PROJECT -- ");
string projectPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName; string projectPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName;
s = Path.Combine(projectPath, Configuration.ConfigDir, Configuration.FileName); fileNamePath = Path.Combine(projectPath, Configuration.ConfigDir, Configuration.FileName);
#else #else
// For release mode, use an absolute path or the application base directory // For release mode, use an absolute path or the application base directory
Console.WriteLine("-- PROD version of THE PROJECT -- "); Console.WriteLine("-- PROD version of THE PROJECT -- ");
fileNamePath = Path.Combine(Environment.CurrentDirectory, Configuration.ConfigDir, Configuration.FileName); fileNamePath = Path.Combine(Environment.CurrentDirectory, Configuration.ConfigDir, Configuration.FileName);
#endif #endif
return s; return fileNamePath;
} }