diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-22 00:46:09 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-22 00:46:09 +0000 |
| commit | c9b5b36906f0b44fc074f8d10acc4be1741e7c7a (patch) | |
| tree | 63bd8db9bd5aaba573faeaf342c9954366d0fac0 /src | |
| parent | c0175add066cbd4ed3988de1f4f70f615f13f877 (diff) | |
Fix filename_relative().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1942 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/filename_absolute.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index 0ec72db23..d6dee8e0e 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.5 2002/01/01 15:11:31 easysw Exp $" +// "$Id: filename_absolute.cxx,v 1.5.2.4.2.6 2002/01/22 00:46:09 easysw Exp $" // // Filename expansion routines for the Fast Light Tool Kit (FLTK). // @@ -141,6 +141,9 @@ filename_relative(char *to, // O - Relative filename else if (*slash != *newslash) break; #endif // WIN32 || __EMX__ || __APPLE__ + if (*newslash == '\0' && *slash != '\0' && !isdirsep(*slash)) + newslash--; + while (!isdirsep(*slash) && slash > from) slash --; if (isdirsep(*slash)) slash ++; @@ -172,5 +175,5 @@ filename_relative(char *to, // O - Relative filename // -// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.5 2002/01/01 15:11:31 easysw Exp $". +// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.6 2002/01/22 00:46:09 easysw Exp $". // |
