From cf5f3fbca22f2bf9bfe3ff43ff189207803fe339 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 29 Oct 2018 17:12:53 +0000 Subject: Fixes STR#3500 - "Must type two leading slashes to enter an absolute path" git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Chooser2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Fl_File_Chooser2.cxx') diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index b0cf27529..57226056d 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -883,8 +883,8 @@ Fl_File_Chooser::fileNameCB() strlcpy(matchname, file, sizeof(matchname)); max_match = (int) strlen(matchname); - // Strip trailing /, if any... - if (matchname[max_match - 1] == '/') { + if (matchname[max_match - 1] == '/' && // Strip trailing /, if any... + matchname[1] != 0 ) { // unless entire path is root ("/") -- STR #3500 max_match --; matchname[max_match] = '\0'; } -- cgit v1.2.3