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 517234 - Exisiting images are re-imported
Exisiting images are re-imported
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Import
SVN
Other All
: Normal minor
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 517626 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-02-18 15:01 UTC by Alexander Skwar
Modified: 2008-03-07 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot showing f-spot trying to re-import existing images (300.60 KB, image/png)
2008-03-03 10:01 UTC, Alexander Skwar
Details

Description Alexander Skwar 2008-02-18 15:01:56 UTC
I've got a folder with many images. In f-spot, I select to import this folder to f-spot and uncheck,that the images are to be copied to the Photos folder.

Next, after having assigned tags and things like that, I go to "Import" and select this exact folder again. In the Import dialog window, all the images that already have been imported are shown again.

That's not the way f-spot used to behave. CMIIW, but IIRC it used to be the case, that f-spot would filter out images that already exist.

Other information:
I'm using f-spot 0.4.1 on Gentoo Linux.
Comment 1 Maxxer 2008-02-18 15:22:14 UTC

*** This bug has been marked as a duplicate of 169646 ***
Comment 2 Stephane Delcroix 2008-02-20 15:03:26 UTC
*** Bug 517626 has been marked as a duplicate of this bug. ***
Comment 3 Stephane Delcroix 2008-02-20 15:04:24 UTC
this is not a dupe. a fix is on its way...
Comment 4 Stephane Delcroix 2008-02-20 15:05:26 UTC
fixed in r3702
Comment 5 Alexander Skwar 2008-03-03 10:01:35 UTC
Created attachment 106452 [details]
Screenshot showing f-spot trying to re-import existing images
Comment 6 Alexander Skwar 2008-03-03 10:02:08 UTC
Not fixed (or broken again in r3726).

$ pwd
/Windows/Documents and Settings/askwar/My Documents/My Pictures/Photos (lokal)/Kategorien/Verschiedenes/2008-03-03

$ ls -la 
insgesamt 4748
drwxrwxrwx 1 askwar users    4096  3. Mar 10:52 .
drwxrwxrwx 1 askwar users   36864  3. Mar 10:50 ..
-rwxrwxrwx 1 askwar users 2772035  3. Mar 10:52 [2008-02-24--06.37.06] (cimg5180) Der Mond, Winterthur, Wohnung, Zu Hause {2.7 MB}.jpg
-rwxrwxrwx 1 askwar users 2044496  3. Mar 10:52 [2008-02-24--06.37.25] (cimg5181) Der Mond, Winterthur, Wohnung, Zu Hause {2.0 MB}.jpg

I just imported this directory which has only those two files. As usual, I unchecked that files are to be copied to the Photos folder.

After having done the import, I tried to re-import this directory. Nothing has been changed in those files (well, at least not from me - f-spot might have done something to the files). Those two images were shown again in the import preview window. The file which I just attached, shows what I see.
Comment 7 Alexander Skwar 2008-03-03 10:07:44 UTC
Just to confirm: f-spot actually re-imports those two files, although they already exist in the f-spot database.

I uploaded my photos.db to http://public-files.askwar.s3.amazonaws.com/f-spot/photos.db. As you can see in the db, there are those entries in the photos table:

sqlite> select * from photos where id > 8172;
8178|1203827826|file:///home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/[2008-02-24--06.37.06] (cimg5180) Der Mond, Winterthur, Wohnung, Zu Hause {2.7 MB}.jpg|Der Mond, Winterthur, Wohnung, Zu Hause|23|1|0
8179|1203827845|file:///home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/[2008-02-24--06.37.25] (cimg5181) Der Mond, Winterthur, Wohnung, Zu Hause {2.0 MB}.jpg|Der Mond, Winterthur, Wohnung, Zu Hause|23|1|0
8180|1203824226|file:///home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/[2008-02-24--06.37.06] (cimg5180) Der Mond, Winterthur, Wohnung, Zu Hause {2.7 MB}.jpg|Der Mond, Winterthur, Wohnung, Zu Hause|24|1|0
8181|1203824245|file:///home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/[2008-02-24--06.37.25] (cimg5181) Der Mond, Winterthur, Wohnung, Zu Hause {2.0 MB}.jpg|Der Mond, Winterthur, Wohnung, Zu Hause|24|1|0

id=8180, id=8181 should not be there.
Comment 8 Stephane Delcroix 2008-03-05 12:20:31 UTC
fixed in r3733
Comment 9 Alexander Skwar 2008-03-05 14:22:46 UTC
Sorry, but not fixed in r3734.

I did some more testing, using my old database, which you can find at http://public-files.askwar.s3.amazonaws.com/f-spot/photos-20080305.db

- Started f-spot
- Imported my directory "/Windows/.../2008-03-03"
-> 2 images were imported (there are 2 files/images in that directory)
- Imported my directory "/Windows/.../2008-03-03" again
-> *NO* images were imported (duplicate check worked!)
- Stopped f-spot
- Started f-spot
- Imported my directory "/Windows/.../2008-03-03"
-> 2 images were imported

This means, that the duplicate check only works "intra-session". That's not as I'd expect it to be.

I get the same results, when I first rm ~/.gnome2/f-spot/photos.db.

I uploaded a tar containing the /Windows/... directory to http://public-files.askwar.s3.amazonaws.com/f-spot/photos-20080305.tar. Size: 4.8M
Comment 10 Stephane Delcroix 2008-03-06 10:53:32 UTC
this should be fixed in r3736, even for your files. but be aware that using utf8-encoded strings as you do still exposes you to potential issues.
Comment 11 Alexander Skwar 2008-03-06 11:24:21 UTC
Hm.

In that directory, there are two files. Complete path names:

/home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/[2008-02-24--06.37.06] (cimg5180) Der Mond, Winterthur, Wohnung, Zu Hause {2.7 MB}.jpg
/home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/[2008-02-24--06.37.25] (cimg5181) Der Mond, Winterthur, Wohnung, Zu Hause {2.0 MB}.jpg

Why are those files UTF-8 encoded? There's no need to, as they only contain US-ASCII characters, don't they? Granted, {, }, [ and ] might not be so common in filenames, but they are ASCII "compatible".

So why are you saying, that utf-8 encoded strings might cause problems? Or is f-spot encoding strings in utf-8 for no good reason?


What I'm trying to get at - are you sure, that UTF-8 is the problem here? If so, why are you sure?


Another note: "/home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/" is not the "real path", so to say. There are some sym links in there. The real path is:

$ cd "/home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03/"

$ pwd 
/home/askwar/Desktop/My Pictures/Photos/Kategorien/Verschiedenes/2008-03-03

$ pwd -P
/Windows/Documents and Settings/askwar/My Documents/My Pictures/Photos (lokal)/Kategorien.in-echt/Verschiedenes/2008-03-03

$ df -T "`pwd -P`"
Dateisystem   Typ    1K‐Blöcke   Benutzt Verfügbar Ben% Eingehängt auf
/dev/sda2  fuseblk    51536516  38416392  13120124  75% /Windows

That's a ntfs3g mounted filesystem.
Comment 12 Stephane Delcroix 2008-03-06 11:51:54 UTC
does the committed patch fixed your issue ?

and no, it's not _striclty_ related to utf8, but to special characters which have to be escaped. In this case, the problem was coming from the comma "," character
Comment 13 Alexander Skwar 2008-03-06 11:56:38 UTC
(In reply to comment #12)
> does the committed patch fixed your issue ?

Yes, it does.

> and no, it's not _striclty_ related to utf8, but to special characters which
> have to be escaped. In this case, the problem was coming from the comma ","
> character

Okay, thanks for your explanation.