Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package feh for openSUSE:Factory checked in at 2021-01-26 14:46:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/feh (Old) and /work/SRC/openSUSE:Factory/.feh.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "feh" Tue Jan 26 14:46:59 2021 rev:40 rq:866730 version:3.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/feh/feh.changes 2021-01-18 11:32:08.592672110 +0100 +++ /work/SRC/openSUSE:Factory/.feh.new.28504/feh.changes 2021-01-26 14:50:32.435742285 +0100 @@ -1,0 +2,8 @@ +Tue Jan 26 07:14:06 UTC 2021 - Paolo Stivanin <[email protected]> + +- Update to 3.6.3: + * Fix --start-at not handling URL-encoded file:/// paths properly. Notably, + this also fixes feh not displaying images with spaces or unicode + elements in their path when opened from a file manager. + +------------------------------------------------------------------- Old: ---- feh-3.6.2.tar.bz2 feh-3.6.2.tar.bz2.asc New: ---- feh-3.6.3.tar.bz2 feh-3.6.3.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ feh.spec ++++++ --- /var/tmp/diff_new_pack.kzPubs/_old 2021-01-26 14:50:33.151743261 +0100 +++ /var/tmp/diff_new_pack.kzPubs/_new 2021-01-26 14:50:33.155743266 +0100 @@ -17,7 +17,7 @@ Name: feh -Version: 3.6.2 +Version: 3.6.3 Release: 0 Summary: X11 image viewer License: MIT AND LGPL-2.0-or-later ++++++ feh-3.6.2.tar.bz2 -> feh-3.6.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/ChangeLog new/feh-3.6.3/ChangeLog --- old/feh-3.6.2/ChangeLog 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/ChangeLog 2021-01-25 17:51:41.000000000 +0100 @@ -1,3 +1,10 @@ +Mon, 25 Jan 2021 17:46:57 +0100 Daniel Friesel <[email protected]> + +* Release v3.6.3 + * Fix --start-at not handling URL-encoded file:/// paths properly. Notably, + this also fixes feh not displaying images with spaces or unicode + elements in their path when opened from a file manager. + Sat, 09 Jan 2021 12:28:06 +0100 Daniel Friesel <[email protected]> * Release v3.6.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/config.mk new/feh-3.6.3/config.mk --- old/feh-3.6.2/config.mk 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/config.mk 2021-01-25 17:51:41.000000000 +0100 @@ -1,5 +1,5 @@ PACKAGE ?= feh -VERSION ?= 3.6.2 +VERSION ?= 3.6.3 app ?= 0 curl ?= 1 @@ -90,7 +90,7 @@ MAN_INOTIFY = disabled endif -MAN_DATE ?= January 09, 2021 +MAN_DATE ?= January 25, 2021 # Uncomment this to use dmalloc #CFLAGS += -DWITH_DMALLOC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/src/filelist.c new/feh-3.6.3/src/filelist.c --- old/feh-3.6.2/src/filelist.c 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/src/filelist.c 2021-01-25 17:51:41.000000000 +0100 @@ -28,6 +28,10 @@ #include <libexif/exif-data.h> #endif +#ifdef HAVE_LIBCURL +#include <curl/curl.h> +#endif + #include "feh.h" #include "filelist.h" #include "signals.h" @@ -678,3 +682,27 @@ free(tmpname); return; } + +#ifdef HAVE_LIBCURL + +char *feh_http_unescape(char *url) +{ + CURL *curl = curl_easy_init(); + if (!curl) { + return NULL; + } + char *tmp_url = curl_easy_unescape(curl, url, 0, NULL); + char *new_url = estrdup(tmp_url); + curl_free(tmp_url); + curl_easy_cleanup(curl); + return new_url; +} + +#else + +char *feh_http_unescape(char *url) +{ + return NULL; +} + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/src/filelist.h new/feh-3.6.3/src/filelist.h --- old/feh-3.6.2/src/filelist.h 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/src/filelist.h 2021-01-25 17:51:41.000000000 +0100 @@ -97,6 +97,7 @@ char *feh_absolute_path(char *path); gib_list *feh_file_remove_from_list(gib_list * list, gib_list * l); void feh_save_filelist(); +char *feh_http_unescape(char * url); int feh_cmp_name(void *file1, void *file2); int feh_cmp_dirname(void *file1, void *file2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/src/options.c new/feh-3.6.3/src/options.c --- old/feh-3.6.2/src/options.c 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/src/options.c 2021-01-25 17:51:41.000000000 +0100 @@ -855,11 +855,26 @@ */ if (opt.start_list_at && path_is_url(opt.start_list_at) && (strlen(opt.start_list_at) <= 8 || strncmp(opt.start_list_at, "file:///", 8) != 0)) { add_file_to_filelist_recursively(opt.start_list_at, FILELIST_FIRST); + /* + * Otherwise, make "feh --start-at dir/file.jpg" behave like + * "feh --start-at dir/file.jpg dir". + */ } else if (opt.start_list_at && strrchr(opt.start_list_at, '/')) { + /* + * feh can't candle urlencoded path components ("some%20dir" etc). + * Use libcurl to unescape them if --start-at is file://... + */ if (strlen(opt.start_list_at) > 8 && strncmp(opt.start_list_at, "file:///", 8) == 0) { - char *start_at_path = estrdup(opt.start_list_at + 7); - free(opt.start_list_at); - opt.start_list_at = start_at_path; + char *unescaped_path = feh_http_unescape(opt.start_list_at); + if (unescaped_path != NULL) { + free(opt.start_list_at); + opt.start_list_at = estrdup(unescaped_path + 7); + free(unescaped_path); + } else { + char *new_path = estrdup(opt.start_list_at + 7); + free(opt.start_list_at); + opt.start_list_at = new_path; + } } char *target_directory = estrdup(opt.start_list_at); char *filename_start = strrchr(target_directory, '/'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/src/slideshow.c new/feh-3.6.3/src/slideshow.c --- old/feh-3.6.2/src/slideshow.c 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/src/slideshow.c 2021-01-25 17:51:41.000000000 +0100 @@ -57,6 +57,7 @@ // Try finding an exact filename match first for (; l && opt.start_list_at; l = l->next) { if (!strcmp(opt.start_list_at, FEH_FILE(l->data)->filename)) { + free(opt.start_list_at); opt.start_list_at = NULL; break; } @@ -83,6 +84,7 @@ current_filename = FEH_FILE(l->data)->filename; } if (!strcmp(start_at_filename, current_filename)) { + free(opt.start_list_at); opt.start_list_at = NULL; break; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/src/thumbnail.c new/feh-3.6.3/src/thumbnail.c --- old/feh-3.6.2/src/thumbnail.c 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/src/thumbnail.c 2021-01-25 17:51:41.000000000 +0100 @@ -411,6 +411,7 @@ else if (opt.start_list_at) { for (l = thumbnails; l; l = l->next) { if (!strcmp(opt.start_list_at, FEH_THUMB(l->data)->file->filename)) { + free(opt.start_list_at); opt.start_list_at = NULL; feh_thumbnail_select(winwid, FEH_THUMB(l->data)); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-3.6.2/src/wallpaper.h new/feh-3.6.3/src/wallpaper.h --- old/feh-3.6.2/src/wallpaper.h 2021-01-09 12:29:27.000000000 +0100 +++ new/feh-3.6.3/src/wallpaper.h 2021-01-25 17:51:41.000000000 +0100 @@ -42,7 +42,7 @@ extern Window ipc_win; extern Atom ipc_atom; -_XFUNCPROTOBEGIN extern Window enl_ipc_get_win(void); +extern Window enl_ipc_get_win(void); extern void enl_ipc_send(char *); extern char *enl_wait_for_reply(void); extern char *enl_ipc_get(const char *); @@ -53,5 +53,4 @@ extern signed char feh_wm_get_wm_is_e(void); void feh_wm_set_bg_filelist(unsigned char bgmode); -_XFUNCPROTOEND #endif
