|
|
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 ] | |
|
| |