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 62ab94f commit 60ff4cfCopy full SHA for 60ff4cf
1 file changed
src/nw_package.cc
@@ -118,9 +118,17 @@ Package::Package()
118
if (args.size() > 0) {
119
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
+ // Note: self_extract_ is true here, otherwise a 'Invalid Package' error
124
+ // would be triggered.
125
+ path_ = GetSelfPath().DirName();
126
+#if defined(OS_MACOSX)
127
+ path_ = path_.DirName().DirName().DirName();
128
+#endif
129
}
130
+ if (InitFromPath())
131
+ return;
132
133
// Finally we init with default settings.
134
0 commit comments