parse_config will be called before reading the arguments, just like get_info
This commit is contained in:
TheDarkBug 2021-08-01 11:32:39 +02:00 committed by GitHub
parent 833a2234c7
commit 075e6e73d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,7 @@ int main(int argc, char *argv[])
{"list", no_argument, NULL, 'l'}, {"list", no_argument, NULL, 'l'},
{NULL, 0, NULL, 0}}; {NULL, 0, NULL, 0}};
get_info(); get_info();
parse_config();
while ((opt = getopt_long(argc, argv, "ac:d:hi::l", long_options, NULL)) != -1) while ((opt = getopt_long(argc, argv, "ac:d:hi::l", long_options, NULL)) != -1)
{ {
switch (opt) switch (opt)
@ -155,8 +156,6 @@ int main(int argc, char *argv[])
break; break;
} }
} }
if (argc == 1)
parse_config();
if ((argc == 1 && ascii_image_flag == 0) || (argc > 1 && ascii_image_flag == 0)) if ((argc == 1 && ascii_image_flag == 0) || (argc > 1 && ascii_image_flag == 0))
{ {
printf("\n"); // print a new line printf("\n"); // print a new line