From 7e79bfa61109a0ea90b7aad978700fc2e240f94e Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 10 Apr 2005 22:37:04 +0000 Subject: Check for proper directory handling with FL_Enter (STR #787) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4267 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Chooser2.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index c9264d7c4..c55012734 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -533,14 +533,16 @@ Fl_File_Chooser::fileNameCB() #endif /* WIN32 || __EMX__ */ directory(pathname); } else if ((type_ & CREATE) || access(pathname, 0) == 0) { - // Update the preview box... - update_preview(); + if (!fl_filename_isdir(pathname) || (type_ & DIRECTORY)) { + // Update the preview box... + update_preview(); - // Do any callback that is registered... - if (callback_) (*callback_)(this, data_); + // Do any callback that is registered... + if (callback_) (*callback_)(this, data_); - // Hide the window to signal things are done... - window->hide(); + // Hide the window to signal things are done... + window->hide(); + } } else { // File doesn't exist, so beep at and alert the user... fl_alert(existing_file_label); -- cgit v1.2.3