Unverified Commit 26cd770c authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Run init_magic before init_parse_options

init_parse_options calls feh_prepare_filelist, which in turn calls
feh_file_info_preload if opt.preload is set. This function will load all
images in the filelist to determine their attributes, so we need to initialize
libmagic before calling init_parse_options.
parent facb67f8
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -49,6 +49,11 @@ int main(int argc, char **argv)
	srandom(getpid() * time(NULL) % ((unsigned int) -1));

	setup_signal_handlers();

#ifdef HAVE_LIBMAGIC
	init_magic();
#endif

	init_parse_options(argc, argv);

	init_imlib_fonts();
@@ -69,10 +74,6 @@ int main(int argc, char **argv)
#endif
	}

#ifdef HAVE_LIBMAGIC
	init_magic();
#endif

	feh_event_init();

	if (opt.index)