diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-29 20:07:34 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-29 20:07:34 +0000 |
| commit | 521ab78b9a2ae324f158836c6199374ded8f4986 (patch) | |
| tree | 36084b48a949aaecadb5f2f8344f2e0b10fea3f2 /src | |
| parent | 7d0d281fb41d407984e24d55c65c868d0eff0690 (diff) | |
Fix file chooser absolute path bug.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 92035f05e..ff4976abb 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.24 2002/10/28 15:00:56 easysw Exp $" +// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.25 2002/10/29 20:07:34 easysw Exp $" // // More Fl_File_Chooser routines. // @@ -522,17 +522,15 @@ Fl_File_Chooser::fileNameCB() if (slash != NULL) { // Yes, change directories if necessary... - if (slash > pathname) // Special case for "/" - *slash++ = '\0'; - else - slash++; - + *slash++ = '\0'; filename = slash; #if defined(WIN32) || defined(__EMX__) - if (strcasecmp(pathname, directory_)) { + if (strcasecmp(pathname, directory_) && + (pathname[0] || strcasecmp("/", directory_))) { #else - if (strcmp(pathname, directory_)) { + if (strcmp(pathname, directory_) && + (pathname[0] || strcasecmp("/", directory_))) { #endif // WIN32 || __EMX__ int p = fileName->position(); int m = fileName->mark(); @@ -1149,5 +1147,5 @@ unquote_pathname(char *dst, // O - Destination string // -// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.24 2002/10/28 15:00:56 easysw Exp $". +// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.25 2002/10/29 20:07:34 easysw Exp $". // |
