From: Andres Mejia Date: Mon, 5 Sep 2011 16:22:28 +0000 (-0400) Subject: Enable support for RAR files generated from MS-DOS and OS/2. X-Git-Tag: v3.0.0a~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=092e6fc66f92ec3c76720e8b2a1de0bc15adb40a;p=thirdparty%2Flibarchive.git Enable support for RAR files generated from MS-DOS and OS/2. Because file attributes in MS-DOS, OS/2, and Windows are similar, I am assuming RAR archives generated from these three systems will use the same attributes. I could not find or generate any test RAR archives for these cases. SVN-Revision: 3681 --- diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c index a1036a0bc..c223357c6 100644 --- a/libarchive/archive_read_support_format_rar.c +++ b/libarchive/archive_read_support_format_rar.c @@ -1211,6 +1211,8 @@ read_header(struct archive_read *a, struct archive_entry *entry, switch(file_header.host_os) { + case OS_MSDOS: + case OS_OS2: case OS_WIN32: rar->mode = archive_le32dec(file_header.file_attr); if (rar->mode & FILE_ATTRIBUTE_DIRECTORY) @@ -1224,8 +1226,6 @@ read_header(struct archive_read *a, struct archive_entry *entry, rar->mode = archive_le32dec(file_header.file_attr); break; - case OS_MSDOS: - case OS_OS2: case OS_MAC_OS: case OS_BEOS: default: