summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-09-30 15:53:49 +0200
committerBenjamin Otte <otte@redhat.com>2019-09-30 16:04:30 +0200
commit7dac406b203270990ddabab12699415c88b2df01 (patch)
tree2d246b5700c66cebba4c56045bb513a4dda26d95
parentc27be686e6af76192c561182bf089b74478ba965 (diff)
downloadglib-7dac406b203270990ddabab12699415c88b2df01.tar.gz
gio-tool: Respect --attributesgio-tool-attributes
Do not add custom attributes when the command-line explicitly specifies some.
-rw-r--r--gio/gio-tool-list.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gio/gio-tool-list.c b/gio/gio-tool-list.c
index d1501b8e0..ce4cbf3cc 100644
--- a/gio/gio-tool-list.c
+++ b/gio/gio-tool-list.c
@@ -192,16 +192,18 @@ handle_list (int argc, char *argv[], gboolean do_help)
g_option_context_free (context);
- if (attributes != NULL)
- show_long = TRUE;
-
- attributes = g_strconcat (G_FILE_ATTRIBUTE_STANDARD_NAME ","
- G_FILE_ATTRIBUTE_STANDARD_TYPE ","
- G_FILE_ATTRIBUTE_STANDARD_SIZE ","
- G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN,
- attributes != NULL ? "," : "",
- attributes,
- NULL);
+ if (attributes == NULL)
+ {
+ attributes = g_strconcat (G_FILE_ATTRIBUTE_STANDARD_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_TYPE ","
+ G_FILE_ATTRIBUTE_STANDARD_SIZE ","
+ G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN,
+ NULL);
+ }
+ else
+ {
+ show_long = TRUE;
+ }
res = TRUE;
if (argc > 1)