Merge pull request #466 from bebehei/stdinconfig

Interpret - as STDIN config file
This commit is contained in:
Nikos Tsipinakis 2018-01-05 18:05:04 +02:00 committed by GitHub
commit db0796b73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,11 @@ void load_settings(char *cmdline_config_path)
xdgInitHandle(&xdg);
if (cmdline_config_path != NULL) {
if (0 == strcmp(cmdline_config_path, "-")) {
config_file = stdin;
} else {
config_file = fopen(cmdline_config_path, "r");
}
if(!config_file) {
char *msg = g_strdup_printf(