diff options
author | Daniel Friesel <derf@finalrewind.org> | 2012-12-06 13:50:53 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2012-12-06 13:50:53 +0100 |
commit | fcd11729ed161588e7ca60e7c5023ae56672a1e3 (patch) | |
tree | 7acb4ac9fe51acfb47a9b9d39b17f7d357ee2684 | |
parent | f40b636b137b7d779c12f8bebd3203c747307b12 (diff) | |
download | feh-fcd11729ed161588e7ca60e7c5023ae56672a1e3.zip |
work around last image deletion bug with --cycle-once (closes #107)
-rw-r--r-- | src/slideshow.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slideshow.c b/src/slideshow.c index 7dcf791..d79c859 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -555,6 +555,14 @@ void feh_filelist_image_remove(winwidget winwid, char do_delete) gib_list *doomed; doomed = current_file; + /* + * work around feh_list_jump exiting if cycle_once is enabled + * and no further files are left (we need to delete first) + */ + if (opt.cycle_once && ! doomed->next && do_delete) { + feh_file_rm_and_free(filelist, doomed); + exit(0); + } slideshow_change_image(winwid, SLIDE_NEXT, 0); if (do_delete) filelist = feh_file_rm_and_free(filelist, doomed); |