After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 399982 - Too many images removed from display when deleting images from under eog
Too many images removed from display when deleting images from under eog
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-23 22:27 UTC by Sven Arvidsson
Modified: 2007-03-05 17:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
fix (1.87 KB, patch)
2007-03-04 21:01 UTC, Claudio Saavedra
committed Details | Review

Description Sven Arvidsson 2007-01-23 22:27:15 UTC
This bug was filed in the Debian BTS.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=370452

"Say I have a folder F which contains the images

    F/1.jpg F/2.jpg F/3.jpg F/4.jpg F/5.jpg

Now I open the folder in eog from the command line

    eog F

and it correctly displays the five images.
However, when from the command line I do

    rm F/1.jpg F/2.jpg F/3.jpg

it does correctly detect the deletion, however it
also stop displaying a number of the still-extant images,
say F/4.jpg."
Comment 1 Licio Fonseca 2007-01-24 15:17:03 UTC
I confirm this bug in version 2.16.0.1
Comment 2 Claudio Saavedra 2007-03-02 21:41:27 UTC
This bug is only in trunk. eog-ng is free of it.

The problem occurrs when more than one file is removed. The directory monitor gets called for each one of the removed files and in each of those calls cleanup_dead_files () is called. Then, it seems like the asynchronous nature of these calls ends up deleting files that are in the old position of the removed files. Messy.

Killing cleanup_dead_files () and removing directly in the monitor callback the deleted files, one by one (as in eog-ng), could make it.
Comment 3 Claudio Saavedra 2007-03-04 21:01:24 UTC
Created attachment 83923 [details] [review]
fix

This implements what I propossed in the previous comment. It fixes the issue by doing the *Right Thing* at the cost of some small performance, but hey, current approach is broken!
Comment 4 Claudio Saavedra 2007-03-04 21:04:56 UTC
hm, the image needs to be unrefered after removing it, of course.
Comment 5 Claudio Saavedra 2007-03-05 17:53:32 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

Committed to trunk (rev. 3612):

2007-03-05  Claudio Saavedra  <csaavedra@alumnos.utalca.cl>

        * libeog/eog-image-list.c: (-cleanup_dead_files), 
        (vfs_monitor_dir_cb): Correctly handle external file removal. 
        Fixes bug #399982.