1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Fix issue #19, accept as argument too

This commit is contained in:
QC 2014-01-29 20:45:38 +01:00
parent 13da91b200
commit 78845b52f4

View file

@ -124,6 +124,9 @@ static pmenu *get_json ( )
if (json_input_file[0] == '-' && json_input_file[1] == '\0') { if (json_input_file[0] == '-' && json_input_file[1] == '\0') {
jo = read_json_file_descr(stdin); jo = read_json_file_descr(stdin);
} }
else if (json_input_file[0] == '{' && strlen(json_input_file) > 3) {
jo = json_tokener_parse(json_input_file);
}
else else
{ {
FILE *fd = fopen(json_input_file, "r"); FILE *fd = fopen(json_input_file, "r");