diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-28 15:00:56 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-28 15:00:56 +0000 |
| commit | 913561c63036ea747fce55b4c46655abe41d5ce3 (patch) | |
| tree | ea573682c10ac0609f8c4906b2f430e6e2c70025 /src/Fl_File_Chooser2.cxx | |
| parent | 4f75130870e244022275e1913581b52ad9f40227 (diff) | |
Fix handling of directories with \ in them.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2694 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index f276f4dc0..92035f05e 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.23 2002/08/09 01:09:48 easysw Exp $" +// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.24 2002/10/28 15:00:56 easysw Exp $" // // More Fl_File_Chooser routines. // @@ -1112,10 +1112,16 @@ quote_pathname(char *dst, // O - Destination string dstsize --; while (*src && dstsize > 1) { - if (*src == '/') + if (*src == '\\') { + // Convert backslash to forward slash... *dst++ = '\\'; + *dst++ = '/'; + src ++; + } else { + if (*src == '/') *dst++ = '\\'; - *dst++ = *src++; + *dst++ = *src++; + } } *dst = '\0'; @@ -1143,5 +1149,5 @@ unquote_pathname(char *dst, // O - Destination string // -// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.23 2002/08/09 01:09:48 easysw Exp $". +// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.24 2002/10/28 15:00:56 easysw Exp $". // |
