mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Ticket #2776: file selection reset after exit from the archive in the root.
After exit from archive located in the root of FS, file selection is reset (/bin is selected instead of the archive). Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
4b457d8757
commit
c457eaf9b1
@ -2980,10 +2980,15 @@ get_parent_dir_name (const char *cwd, const char *lwd)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (--p > lwd && *p != PATH_SEP);
|
||||
while (--p > lwd && *p != PATH_SEP);
|
||||
/* skip VFS prefix */
|
||||
while (--p > lwd && *p != PATH_SEP)
|
||||
;
|
||||
/* get last component */
|
||||
while (--p > lwd && *p != PATH_SEP)
|
||||
;
|
||||
|
||||
return (p != lwd) ? p + 1 : NULL;
|
||||
/* return last component */
|
||||
return (*p == PATH_SEP) ? p + 1 : p;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user