projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
239715f
)
fixed determining program main data path for Mac OS X
author
Holger Schemel
<info@artsoft.org>
Fri, 6 Jan 2017 18:13:28 +0000
(19:13 +0100)
committer
Holger Schemel
<info@artsoft.org>
Fri, 6 Jan 2017 18:13:28 +0000
(19:13 +0100)
src/libgame/misc.c
patch
|
blob
|
history
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index 559fd3859a69b443e9a95267d269c92118780c5c..bf40ca9bdfac02fbbf4c6addf2c3dd3b87b2186e 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-701,6
+701,10
@@
static char *getProgramMainDataPath()
// cut trailing path separator from path (but not if path is root directory)
if (strSuffix(main_data_path, "/") && !strEqual(main_data_path, "/"))
main_data_path[strlen(main_data_path) - 1] = '\0';
+
+ // replace empty path with current directory
+ if (strEqual(main_data_path, ""))
+ main_data_path = ".";
#endif
return main_data_path;