Unverified Commit 2243f169 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

read_filelist: support UNIX and DOS line endings

Note that, independent of the input format, feh will always save file lists in
UNIX format (\n only).

Closes #787
parent 9df71dae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,7 @@ gib_list *feh_read_filelist(char *filename)
	for (; fgets(s, sizeof(s), fp);) {
		D(("Got line '%s'\n", s));
		s1[0] = '\0';
		sscanf(s, "%[^\n]", (char *) &s1);
		sscanf(s, "%[^\r\n]", (char *) &s1);
		if (!(*s1) || (*s1 == '\n'))
			continue;
		D(("Got filename %s from filelist file\n", s1));