Author: bgbnbigben
Date: 2011-12-04 03:20:28 -0800 (Sun, 04 Dec 2011)
New Revision: 9194
Log:
Fixed an issue where getenv("PWD") was being used preferentially to getcwd()
(STR #2784)
Thanks to jmb for this fix.
Modified:
trunk/src/filename_absolute.cxx
Modified: trunk/src/filename_absolute.cxx
===================================================================
--- trunk/src/filename_absolute.cxx 2011-12-02 09:24:59 UTC (rev 9193)
+++ trunk/src/filename_absolute.cxx 2011-12-04 11:20:28 UTC (rev 9194)
@@ -102,8 +102,8 @@
// current directory
if (pwd) prefix = pwd;
else {
- prefix = getenv("PWD");
- if (!prefix) prefix = getcwd(output, length);
+ prefix = getcwd(output, length);
+ if (!prefix) prefix = getenv("PWD");
}
prefixlen = strlen(prefix);
}
@@ -144,8 +144,8 @@
}
if (!cwd) {
- cwd = getenv("PWD");
- if (!cwd) cwd = getcwd(to, tolen);
+ cwd = getcwd(to, tolen);
+ if (!cwd) cwd = getenv("PWD");
}
const char* slash = from;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit