FLTK logo

[master] 9c89a7f - Handling trailing ".." in fl_filename_absolute.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 9c89a7f - Handling trailing ".." in fl_filename_absolute. "Matthias Melcher" Jun 11, 2022  
 
commit 9c89a7f320ff1be3bf7dd8f677391e95d8814744
Author:     Matthias Melcher <github@matthiasm.com>
AuthorDate: Sat Jun 11 12:34:47 2022 +0200
Commit:     Matthias Melcher <github@matthiasm.com>
CommitDate: Sat Jun 11 12:34:47 2022 +0200

    Handling trailing ".." in fl_filename_absolute.

 src/filename_absolute.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/filename_absolute.cxx src/filename_absolute.cxx
index 4e4e8ff..653217a 100644
--- src/filename_absolute.cxx
+++ src/filename_absolute.cxx
@@ -72,7 +72,7 @@ int Fl_System_Driver::filename_absolute(char *to, int tolen, const char *from) {
   if (isdirsep(*(a-1))) a--;
   /* remove intermediate . and .. names: */
   while (*start == '.') {
-    if (start[1]=='.' && isdirsep(start[2])) {
+    if (start[1]=='.' && (isdirsep(start[2]) || start[2]==0) ) {
       char *b;
       for (b = a-1; b >= temp && !isdirsep(*b); b--) {/*empty*/}
       if (b < temp) break;
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.