modified src/main.cpp +3 -5
| @@ -28,7 +28,7 @@ std::string database_initialization_command = |
| 28 | 28 | |
| 29 | 29 | std::string select_all_games_command = "SELECT * FROM games;"; |
| 30 | 30 | |
| 31 | | -bool debugRun = true; |
| 31 | +bool debugRun = false; |
| 32 | 32 | |
| 33 | 33 | void printMessage(std::string message) { |
| 34 | 34 | if (debugRun) { |
| @@ -169,10 +169,8 @@ auto runConsoleApp(sqlite3* database) -> void { |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | auto main(int argc, char const *argv[]) -> int { |
| 172 | | - auto appDirectory{ std::filesystem::path(argv[0])}; |
| 173 | | - std::cout << appDirectory.parent_path().string() << std::endl; |
| 174 | | - auto databasePath{ std::filesystem::path(appDirectory.parent_path().string() + "/data.db")}; |
| 175 | | - std::cout << databasePath.string() << std::endl; |
| 172 | + auto appPath{ std::filesystem::path(argv[0])}; |
| 173 | + auto databasePath{ std::filesystem::path(appPath.parent_path().string() + "/data.db")}; |
| 176 | 174 | bool newCreation = not std::filesystem::exists(databasePath.string()); |
| 177 | 175 | char *messageError; |
| 178 | 176 | sqlite3 *database; |
| @@ -28,7 +28,7 @@ std::string database_initialization_command = |
| 28 | | 28 | |
| 29 | std::string select_all_games_command = "SELECT * FROM games;"; | 29 | std::string select_all_games_command = "SELECT * FROM games;"; |
| 30 | | 30 | |
| 31 | -bool debugRun = true; | 31 | +bool debugRun = false; |
| 32 | | 32 | |
| 33 | void printMessage(std::string message) { | 33 | void printMessage(std::string message) { |
| 34 | if (debugRun) { | 34 | if (debugRun) { |
| @@ -169,10 +169,8 @@ auto runConsoleApp(sqlite3* database) -> void { |
| 169 | } | 169 | } |
| 170 | | 170 | |
| 171 | auto main(int argc, char const *argv[]) -> int { | 171 | auto main(int argc, char const *argv[]) -> int { |
| 172 | - auto appDirectory{ std::filesystem::path(argv[0])}; | 172 | + auto appPath{ std::filesystem::path(argv[0])}; |
| 173 | - std::cout << appDirectory.parent_path().string() << std::endl; | 173 | + auto databasePath{ std::filesystem::path(appPath.parent_path().string() + "/data.db")}; |
| 174 | - auto databasePath{ std::filesystem::path(appDirectory.parent_path().string() + "/data.db")}; | | |
| 175 | - std::cout << databasePath.string() << std::endl; | | |
| 176 | bool newCreation = not std::filesystem::exists(databasePath.string()); | 174 | bool newCreation = not std::filesystem::exists(databasePath.string()); |
| 177 | char *messageError; | 175 | char *messageError; |
| 178 | sqlite3 *database; | 176 | sqlite3 *database; |