From: Koji Arai Date: Fri, 29 Aug 2008 16:14:58 +0000 (+0900) Subject: should use header->method instead of permission for timestamp archiving X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=0e519546f67fd787dbdccaad6052d7a675c85b46;hp=15dd1dd5abe24a1bfeed1be7ce81254a17f245bd;p=lha%2Flha.git should use header->method instead of permission for timestamp archiving --- diff --git a/src/lhadd.c b/src/lhadd.c index 6ee90e1..263b696 100644 --- a/src/lhadd.c +++ b/src/lhadd.c @@ -28,8 +28,8 @@ copy_old_one(oafp, nafp, hdr) writing_filename = temporary_name; copyfile(oafp, nafp, hdr->header_size + hdr->packed_size, 0, 0); - if (!((hdr->unix_mode & UNIX_FILE_SYMLINK) == UNIX_FILE_SYMLINK || - (hdr->unix_mode & UNIX_FILE_DIRECTORY) == UNIX_FILE_DIRECTORY)) { + /* directory and symlink are ignored for time-stamp archiving */ + if (memcmp(hdr->method, "-lhd-", 5) != 0) { if (most_recent < hdr->unix_last_modified_stamp) most_recent = hdr->unix_last_modified_stamp; } @@ -47,8 +47,8 @@ add_one(fp, nafp, hdr) reading_filename = hdr->name; writing_filename = temporary_name; - if (!((hdr->unix_mode & UNIX_FILE_SYMLINK) == UNIX_FILE_SYMLINK || - (hdr->unix_mode & UNIX_FILE_DIRECTORY) == UNIX_FILE_DIRECTORY)) { + /* directory and symlink are ignored for time-stamp archiving */ + if (memcmp(hdr->method, "-lhd-", 5) != 0) { if (most_recent < hdr->unix_last_modified_stamp) most_recent = hdr->unix_last_modified_stamp; }