summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-06-11 12:34:47 +0200
committerMatthias Melcher <github@matthiasm.com>2022-06-11 12:34:47 +0200
commit9c89a7f320ff1be3bf7dd8f677391e95d8814744 (patch)
tree84181cafd7ed47f4e6767e39ca6f64e91f23d1cb
parentbcbdf5546f53afdc0e3a4bb7458eb863783e76fd (diff)
Handling trailing ".." in fl_filename_absolute.
-rw-r--r--src/filename_absolute.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx
index 4e4e8ff56..653217a0d 100644
--- a/src/filename_absolute.cxx
+++ b/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;