Ensure that the option setters return OK (option used) even

for options that don't change the list of keywords.
This commit is contained in:
kientzle 2009-04-17 01:03:52 +00:00
parent a0fd30c500
commit 6a280329f3

View File

@ -962,8 +962,10 @@ archive_write_mtree_options(struct archive_write *a, const char *key,
case 'd':
if (strcmp(key, "device") == 0)
keybit = F_DEV;
else if (strcmp(key, "dironly") == 0)
else if (strcmp(key, "dironly") == 0) {
mtree->dironly = (value != NULL)? 1: 0;
return (ARCHIVE_OK);
}
break;
case 'f':
if (strcmp(key, "flags") == 0)
@ -976,8 +978,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 +1043,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) {