mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-24 20:22:11 +03:00
Fixed skip of empty directories in the root of cpio archive.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
698385bdd0
commit
f84917a188
@ -331,7 +331,10 @@ cpio_create_entry (struct vfs_class *me, struct vfs_s_super *super,
|
||||
tn = strrchr (name, PATH_SEP);
|
||||
if (tn == NULL)
|
||||
tn = name;
|
||||
else {
|
||||
else if (tn == name + 1) {
|
||||
/* started with "./" -- directory in the root of archive */
|
||||
tn++;
|
||||
} else {
|
||||
*tn = '\0';
|
||||
root = vfs_s_find_inode (me, super, name, LINK_FOLLOW, FL_MKDIR);
|
||||
*tn = PATH_SEP;
|
||||
@ -341,7 +344,7 @@ cpio_create_entry (struct vfs_class *me, struct vfs_s_super *super,
|
||||
entry = MEDATA->find_entry (me, root, tn, LINK_FOLLOW, FL_NONE); /* In case entry is already there */
|
||||
|
||||
if (entry != NULL) {
|
||||
/* This shouldn't happen! (well, it can happen if there is a record for a
|
||||
/* This shouldn't happen! (well, it can happen if there is a record for a
|
||||
file and than a record for a directory it is in; cpio would die with
|
||||
'No such file or directory' is such case) */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user