]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Enable support for RAR files generated from MS-DOS and OS/2.
authorAndres Mejia <amejia004@gmail.com>
Mon, 5 Sep 2011 16:22:28 +0000 (12:22 -0400)
committerAndres Mejia <amejia004@gmail.com>
Mon, 5 Sep 2011 16:22:28 +0000 (12:22 -0400)
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

libarchive/archive_read_support_format_rar.c

index a1036a0bce6695388b5eac82cef4ecdda4bb6d74..c223357c6f87713c22511270071bc7eb7d562605 100644 (file)
@@ -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: