]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Return ARCHIVE_OK for "indent" and "use-set" options, which
authorTim Kientzle <kientzle@gmail.com>
Thu, 26 Mar 2009 06:14:29 +0000 (02:14 -0400)
committerTim Kientzle <kientzle@gmail.com>
Thu, 26 Mar 2009 06:14:29 +0000 (02:14 -0400)
are consumed but don't use the 'keybit' mechanism.  Without
this, mtree options returned ARCHIVE_WARN ("not used") for
these options.

SVN-Revision: 853

libarchive/archive_write_set_format_mtree.c

index 0043030dd244ab49ac4cd97f6e9b4d4a1404f41c..369209875ea3809ca043902b7e5df14f6eb1c342 100644 (file)
@@ -976,8 +976,10 @@ archive_write_mtree_options(struct archive_write *a, const char *key,
                        keybit = F_GNAME;
                break;
        case 'i':
-               if (strcmp(key, "indent") == 0)
+               if (strcmp(key, "indent") == 0) {
                        mtree->indent = (value != NULL)? 1: 0;
+                       return (ARCHIVE_OK);
+               }
                break;
        case 'l':
                if (strcmp(key, "link") == 0)
@@ -1039,8 +1041,10 @@ archive_write_mtree_options(struct archive_write *a, const char *key,
                        keybit = F_UID;
                else if (strcmp(key, "uname") == 0)
                        keybit = F_UNAME;
-               else if (strcmp(key, "use-set") == 0)
+               else if (strcmp(key, "use-set") == 0) {
                        mtree->set.output = (value != NULL)? 1: 0;
+                       return (ARCHIVE_OK);
+               }
                break;
        }
        if (keybit != 0) {