Once more tar.c ./files
- From: Leonard den Ottolander <leonard den ottolander nl>
- To: MC Devel <mc-devel gnome org>
- Subject: Once more tar.c ./files
- Date: Thu, 28 Oct 2004 23:40:06 +0200
Hi,
While looking at Pavel's wiki
(http://www.pavelsh.pp.ru/wiki/doku.php?id=mc-bugs) I remembered that
the discussion about LGPLed VFS using GPL code was started because of
the tar.c issue. Came across the entry "three bugs" with this reference:
http://mail.gnome.org/archives/mc-devel/2004-April/msg00010.html . The
last hunk is has a much more elegant solution to the ./file problem.
Patch against current CVS attached. This effectively reverts the latest
fixes to tar.c, but it works.
Leonard.
--
mount -t life -o ro /dev/dna /genetic/research
--- vfs/tar.c.000 2004-10-27 15:27:49.000000000 +0200
+++ vfs/tar.c 2004-10-28 23:29:59.000000000 +0200
@@ -465,10 +465,8 @@ tar_read_header (struct vfs_class *me, s
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, s
} 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]