Merge branch '2776_archive_selection_in_root' into 4.8.1-stable

* 2776_archive_selection_in_root:
  Ticket #2776: file selection reset after exit from the archive in the root.
This commit is contained in:
Andrew Borodin 2012-04-13 14:57:45 +04:00
commit 88bf4cc672

View File

@ -2704,10 +2704,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;
}
/* --------------------------------------------------------------------------------------------- */