summaryrefslogtreecommitdiff
path: root/strgen
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-24 15:36:25 +0000
committertruelight <truelight@openttd.org>2006-08-24 15:36:25 +0000
commit0113216d3b8827d2804d1c4b1b74f1496b7d0320 (patch)
tree82c3b70ad48a8492dc8f6c77ef3e665b4af50dd2 /strgen
parent54c9f059610e4befc3e25ffe8aad0e69f7027a83 (diff)
downloadopenttd-0113216d3b8827d2804d1c4b1b74f1496b7d0320.tar.xz
(svn r6097) -Fix: mingw and cygwin get / from Makefile, where \ is expected. Make exeption code for it (tnx for debug Frostregen)
Diffstat (limited to 'strgen')
-rw-r--r--strgen/strgen.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/strgen/strgen.c b/strgen/strgen.c
index 015cf2f88..bd8eea1bc 100644
--- a/strgen/strgen.c
+++ b/strgen/strgen.c
@@ -1311,7 +1311,12 @@ int CDECL main(int argc, char* argv[])
if (_errors) return 1;
/* get the targetfile, strip any directories and append to destination path */
+#if defined(__MINGW32__) || defined (__CYGWIN__)
+ /* Under mingw32 and cygwin, we enter / via the Makefile, not the expected \ */
+ r = strrchr(argv[1], "/");
+#else
r = strrchr(argv[1], PATHSEPCHAR);
+#endif
mkpath(pathbuf, lengthof(pathbuf), dest_dir, (r != NULL) ? &r[1] : argv[1]);
/* rename the .txt (input-extension) to .lng */