[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

../xwpe



Found a new bug in 1.5.25a.  As part of the fix for fixed limits on
paths and file name, I switched to using WpeGetCurrentDir instead of
getcwd.  Unfortunately the WpeGetCurrentDir includes a '/' at the
end that screws up the "../" handling.  For example to load "../hello.c",
you need to do "../../hello.c" at moment.

Here's a bug fix.

Dennis Payne
dulsi@identicalsoftware.com

--- we_edit.c.orig	Sun Dec 17 18:08:10 2000
+++ we_edit.c	Sun Dec 17 18:08:10 2000
@@ -1911,6 +1911,9 @@
     *file = NULL;
     return ;
    }
+   /* Delete the slash at the end. */
+   len = strlen(cur_dir);
+   cur_dir[len - 1] = 0;
    len = tmp - filename + 1;
    while (strncmp(filename, "../", 3) == 0)
    {