Interpret - as STDIN config file

This commit is contained in:
Benedikt Heine 2017-11-30 20:26:21 +01:00
parent 4908a75a89
commit b337fdfefa

View File

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