Fix file chooser absolute path bug.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-10-29 20:07:34 +00:00
parent 7d0d281fb4
commit 521ab78b9a
2 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.2
- Fixed a bug in the file chooser when entering an
absolute path.
- Back-ported some FLTK 2.0 tooltip changes to eliminate
erroneous tooltip display.
- MacOS windows were resizable, even when size_range

View File

@ -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++;
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 $".
//