Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5210286 commit 96112f4Copy full SHA for 96112f4
1 file changed
src/nw_package.cc
@@ -112,18 +112,20 @@ Package::Package()
112
if (InitFromPath())
113
return;
114
115
+ self_extract_ = false;
116
// Then see if we have arguments and extract it.
117
CommandLine* command_line = CommandLine::ForCurrentProcess();
118
const CommandLine::StringVector& args = command_line->GetArgs();
119
if (args.size() > 0) {
- self_extract_ = false;
120
path_ = FilePath(args[0]);
121
- if (InitFromPath())
122
- return;
+ } else {
+ // Try to load from the folder where the exe resides
123
+ path_ = GetSelfPath().DirName();
124
}
125
+ if (InitFromPath())
126
+ return;
127
128
// Finally we init with default settings.
129
InitWithDefault();
130
131
0 commit comments