diff options
Diffstat (limited to 'src/filename_absolute.cxx')
| -rw-r--r-- | src/filename_absolute.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index 6ce6d7042..5a70d9d77 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -1,5 +1,5 @@ // -// "$Id: filename_absolute.cxx,v 1.5.2.4.2.10 2003/01/30 21:43:20 easysw Exp $" +// "$Id: filename_absolute.cxx,v 1.5.2.4.2.11 2004/03/11 05:17:12 easysw Exp $" // // Filename expansion routines for the Fast Light Tool Kit (FLTK). // @@ -132,6 +132,11 @@ fl_filename_relative(char *to, // O - Relative filename } #if defined(WIN32) || defined(__EMX__) + if (!strcasecmp(from, cwd)) { + strlcpy(to, ".", tolen); + return (1); + } + if (*from != *cwd) { // Not the same drive... strlcpy(to, from, tolen); @@ -139,6 +144,11 @@ fl_filename_relative(char *to, // O - Relative filename } for (slash = from + 2, newslash = cwd + 2; #else + if (!strcmp(from, cwd)) { + strlcpy(to, ".", tolen); + return (1); + } + for (slash = from, newslash = cwd; #endif // WIN32 || __EMX__ *slash != '\0' && *newslash != '\0'; @@ -176,5 +186,5 @@ fl_filename_relative(char *to, // O - Relative filename // -// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.10 2003/01/30 21:43:20 easysw Exp $". +// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.11 2004/03/11 05:17:12 easysw Exp $". // |
