Skip to content

Commit c442adf

Browse files
committed
Merge branch 'main' into Version2
2 parents 00e7b53 + b770282 commit c442adf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// "args": ["123123DropBox.exe", "-sleepTime", "1200"],
1515
// "args": ["123123DropBox.exe", "-sleepTime", "a1200"],
1616
// "args": ["123123DropBox.exe", "-sleepTime"],
17-
"args": ["-exesConfig"],
17+
// "args": ["-exesConfig"],
18+
"args": ["-ec"],
1819
"stopAtEntry": false,
1920
"cwd": "${workspaceFolder}",
2021
"environment": [],

src/ProgramArgs.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <vector>
44
#include <algorithm>
5+
#include <filesystem>
56
#include <fstream>
67

78
#include "Common.h"
@@ -68,8 +69,9 @@ bool ProcessProgramArgs(int argc , const char** argv, ProgramCmdLineOptions& pro
6869
cmdArgs.pop_back();
6970

7071
if(hasExeConfigs)
71-
{
72-
std::ifstream file("exesConfig.ecfg");
72+
{
73+
const std::string exeConfPath = std::filesystem::current_path().string() + "\\" + "exesConfig.ecfg";
74+
std::ifstream file(exeConfPath);
7375
if (file.is_open())
7476
{
7577
std::string line;
@@ -84,7 +86,7 @@ bool ProcessProgramArgs(int argc , const char** argv, ProgramCmdLineOptions& pro
8486
}
8587
else
8688
{
87-
PrintToConsole( "exesConfigs.ecfg not found\n" );
89+
PrintToConsole( "exesConfig.ecfg not found\n" );
8890
return false;
8991
}
9092
}

0 commit comments

Comments
 (0)