summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2018-10-29 17:12:53 +0000
committerGreg Ercolano <erco@seriss.com>2018-10-29 17:12:53 +0000
commitcf5f3fbca22f2bf9bfe3ff43ff189207803fe339 (patch)
treeab535d3600505dd6fdb1fd748668c41f1a1ba5b3 /src/Fl_File_Chooser2.cxx
parent71d7a9db79044d7aa479c136248f75542188e6f5 (diff)
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
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx4
1 files changed, 2 insertions, 2 deletions
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';
}