diff -u nano/files.c nano-opdir/files.c --- nano/files.c Sun Jan 26 16:14:33 2003 +++ nano-opdir/files.c Sun Jan 26 16:14:28 2003 @@ -2613,14 +2613,12 @@ break; } - path = mallocstrcpy(path, filelist[selected]); - #ifndef DISABLE_OPERATINGDIR /* Note: The case of the user's being completely outside the operating directory is handled elsewhere, before this point */ if (operating_dir != NULL) { - if (check_operating_dir(path, 0)) { + if (check_operating_dir(filelist[selected], 0)) { statusbar(_("Can't visit parent in restricted mode")); beep(); break; @@ -2628,6 +2626,8 @@ } #endif + path = mallocstrcpy(path, filelist[selected]); + /* SPK for '.' path, get the current path via getcwd */ if (!strcmp(path, "./..")) { free(path);