]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/retr.c
retreat lretreat: Strip trailing 'h' from retreat path
[empserver] / src / lib / commands / retr.c
index 326419db33c234e9a02566cfc6f5c1c948f5a6e1..0b08a7454de14ad8eddd7b69621d3c51bf06e3c6 100644 (file)
@@ -71,8 +71,7 @@ retreat(int type)
     int nunits;
     struct nstr_item ni;
     union empobj_storage unit;
-    int rflags, ch, j;
-    unsigned i;
+    int i, rflags, ch, j;
     char *rflagsc, *p, *name, *rpath, *what;
     int *rflagsp;
     char buf1[1024];
@@ -96,6 +95,8 @@ retreat(int type)
                return RET_SYN;
            }
        }
+       for (i--; i >= 0 && pq[i] == dirch[DIR_STOP]; i--)
+           pq[i] = 0;
     } else
        pq = NULL;