mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
* tar.c (tar_read_header): Fix pathname canonicalization.
This commit is contained in:
parent
5b57056d23
commit
75ec336c52
@ -1,3 +1,7 @@
|
||||
2004-11-01 Leonard den Ottolander <leonard * den ottolander nl>
|
||||
|
||||
* tar.c (tar_read_header): Fix pathname canonicalization.
|
||||
|
||||
2004-10-29 Pavel S. Shirshov <me@pavelsh.pp.ru>
|
||||
|
||||
* extfs/iso9660.in (mcisofs_list): Fix regular expression for stripping
|
||||
|
10
vfs/tar.c
10
vfs/tar.c
@ -465,10 +465,8 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive,
|
||||
current_file_name =
|
||||
(next_long_name ? next_long_name :
|
||||
g_strdup (header->header.arch_name));
|
||||
canonicalize_pathname (current_file_name);
|
||||
len = strlen (current_file_name);
|
||||
if (current_file_name[len - 1] == '/') {
|
||||
current_file_name[len - 1] = 0;
|
||||
}
|
||||
|
||||
data_position = current_tar_position;
|
||||
|
||||
@ -479,13 +477,7 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive,
|
||||
} else {
|
||||
*(p++) = 0;
|
||||
q = current_file_name;
|
||||
/* FIXME: should be q = vfs_normalize_dir(q) */
|
||||
while (q[0] == '.' && q[1] == '/')
|
||||
q += 2;
|
||||
if (*q == '.' && *(q+1) == '\0')
|
||||
q++;
|
||||
}
|
||||
canonicalize_pathname(q);
|
||||
|
||||
parent =
|
||||
vfs_s_find_inode (me, archive, q, LINK_NO_FOLLOW, FL_MKDIR);
|
||||
|
Loading…
Reference in New Issue
Block a user