Commit 5f4a9ec5 authored by Anthony Iliopoulos's avatar Anthony Iliopoulos Committed by derf
Browse files

winwidget: do not add an inotify watch if file is a url

inotify_add_watch calls fail when the file is a url, since it does not
correspond to an actual on-disk path. The temporary file path fetched by
curl could be kept and monitored, but since this is unlikely to change
just avoid monitoring files opened via a url.
parent dea77137
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -739,7 +739,7 @@ void winwidget_inotify_remove(winwidget winwid)
#ifdef HAVE_INOTIFY
void winwidget_inotify_add(winwidget winwid, feh_file * file)
{
    if (opt.auto_reload) {
    if (opt.auto_reload && !path_is_url(file->filename)) {
        D(("Adding inotify watch for %s\n", file->filename));
        char dir[PATH_MAX];
        feh_file_dirname(dir, file, PATH_MAX);