diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/filelist.c | 15 | ||||
| -rw-r--r-- | src/options.c | 5 | 
2 files changed, 5 insertions, 15 deletions
| diff --git a/src/filelist.c b/src/filelist.c index 0373504..d83b8df 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -440,7 +440,7 @@ int feh_write_filelist(gib_list * list, char *filename)  	FILE *fp;  	gib_list *l; -	if (!list || !filename) +	if (!list || !filename || !strcmp(filename, "/dev/stdin"))  		return(0);  	errno = 0; @@ -467,19 +467,6 @@ gib_list *feh_read_filelist(char *filename)  	if (!filename)  		return(NULL); -	/* try and load the given filelist as an image, cowardly refuse to -	 * overwrite an image with a filelist. (requested by user who did feh -df * -	 * when he meant feh -dF *, as it overwrote the first image with the -	 * filelist). -	 */ -	if (feh_load_image_char(&im1, filename)) { -		weprintf( -				"The file you specified as a filelist to read - %s - appears to be an image. Ignoring it (this is a common mistake).\n", -				filename); -		opt.filelistfile = NULL; -		return(NULL); -	} -  	errno = 0;  	if ((fp = fopen(filename, "r")) == NULL) {  		/* return quietly, as it's okay to specify a filelist file that doesn't diff --git a/src/options.c b/src/options.c index 13aaa95..c5ed85d 100644 --- a/src/options.c +++ b/src/options.c @@ -627,7 +627,10 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)  			opt.alpha_level = 255 - atoi(optarg);  			break;  		case 'f': -			opt.filelistfile = estrdup(optarg); +			if (!strcmp(optarg, "-")) +				opt.filelistfile = estrdup("/dev/stdin"); +			else +				opt.filelistfile = estrdup(optarg);  			break;  		case '0':  			opt.reload_button = atoi(optarg); | 
