Add collection error message

Bug #500581 reported by ®om
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
digiKam
Fix Released
Medium
digikam (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: digikam

I have 2 collections :
- ~/Images/apn
- ~/Images/apn-reflex

If I add the apn one first, then I have an error message when adding apn-reflex : "you already added a collection which contains apn-reflex" (my own translation), while apn-reflex is not a subfolder of apn…

If I add the second first, it works…

ProblemType: Bug
Architecture: amd64
Date: Sat Dec 26 19:31:18 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/digikam
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: nvidia
Package: digikam 2:1.0.0~beta5-1ubuntu1
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-16.53-generic
SourcePackage: digikam
Uname: Linux 2.6.31-16-generic x86_64

Revision history for this message
®om (rom1v) wrote :
description: updated
Revision history for this message
Luka Renko (lure) wrote :

OK, I can reproduce the problem - will report to upstream.

Changed in digikam (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Luka Renko (lure) wrote :

Reported upstream - marking as Triaged.

Changed in digikam (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
In , Luka Renko (lure) wrote :

Version: (using KDE 4.3.4)
OS: Linux
Installed from: Ubuntu Packages

Report from Ubuntu bug:

I have 2 collections :
- ~/Images/apn
- ~/Images/apn-reflex

If I add the apn one first, then I have an error message when adding apn-reflex : "you already added a collection which contains apn-reflex" (my own translation), while apn-reflex is not a subfolder of apn…

If I add the second first, it works…

I have reproduced the problem with digikam 1.0.0 and it seems the problem is that the function that checks the directory name wrongly identify similarly named directory as duplicate collection.

Revision history for this message
In , Caulier-gilles-9 (caulier-gilles-9) wrote :
Revision history for this message
In , Luka Renko (lure) wrote :

Created attachment 39536
screenshot of the error

No, it is the error as shown in attachment.

Revision history for this message
In , Marcel-wiesweg (marcel-wiesweg) wrote :

rootPath = ~/Images/apn
filePath = ~/Images/apn-reflex/xyz

if (filePath.startsWith(rootPath))
{
    ...
}

That's the current code. The mistake is obvious, you already point to it above.
I want to avoid accessing the filesystem here, just compare strings.

Revision history for this message
In , Marcel-wiesweg (marcel-wiesweg) wrote :

SVN commit 1078190 by mwiesweg:

Add extra check to compare directories

CCBUG: 221155

 M +7 -3 collectionmanager.cpp

WebSVN link: http://websvn.kde.org/?view=rev&revision=1078190

Revision history for this message
In , Marcel-wiesweg (marcel-wiesweg) wrote :

Luka, would you like to test?

Revision history for this message
In , Marcel-wiesweg (marcel-wiesweg) wrote :

*** Bug 216017 has been marked as a duplicate of this bug. ***

Changed in digikam:
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package digikam - 2:1.1.0-1ubuntu1

---------------
digikam (2:1.1.0-1ubuntu1) lucid; urgency=low

  * New upstream release:
    - Rename in BQM fails with multi dot names (LP: #501135)
    - Add collection with similar name fails (LP: #500581)
    - Add SMB folder error message (LP: #350280)
    - Zoom indicators indicate wrong magnification (LP: #510346)
  * Merge with Debian, remaining changes:
    - Export .pot name and copy to plugins in debian/rules
    - Build-depend on libkipi7-dev, libkexiv2-8-dev and
      libkdcraw8-dev (KDE 4.3 -> 4.4)
    - Build-depend on libmarble-dev (was disabled temporarily
      in Debian due to 4.3.4 regression)
 -- Luka Renko <email address hidden> Thu, 04 Feb 2010 07:46:57 +0100

Changed in digikam (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
In , Luka Renko (lure) wrote :

Marcel, I tested it now with 1.1, and the problem is not fixed. :-(

Revision history for this message
In , Marcel-wiesweg (marcel-wiesweg) wrote :

Ok I see. It does not work when you add the two collections in one go, does it? Didn't test that case. When you close the dialog in between, it works. And at least you get now a meaningful error message ;-)
Will fix this.
Or did you test another case?

Revision history for this message
Luka Renko (lure) wrote :

Sorry, it is not fully fixed yet: it works if you add one collection, close dialog, add another one; but it does not work if you add both collections in one run.

Changed in digikam (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
In , Luka Renko (lure) wrote :

Marcel, you are correct:
- if I add both collections in one go (same dialog) -> fail
- add first collection, close, add second connection -> OK

A side note: when adding directories of local FS (it is on dm-crypt+LVM volume), I get the following warning:
It is not possible on your system to identify the storage medium of this path. It will be added using the file path as the only identifier. This will work well for your local disk.

Since this is the local disk, I think this warning will just confuse the user...

Revision history for this message
In , N7DR (doc-evans) wrote :

(In reply to comment #9)

>
> A side note: when adding directories of local FS (it is on dm-crypt+LVM
> volume), I get the following warning:
> It is not possible on your system to identify the storage medium of this path.
> It will be added using the file path as the only identifier. This will work
> well for your local disk.
>
> Since this is the local disk, I think this warning will just confuse the
> user...

I agree that I always find this a very odd warning. Basically it seems to say "here's a problem -- although what the problem is isn't at all obvious -- but you can ignore this message if you're using a local disk".

I've always ignored it, but also every time I see it I wonder "what would I do if I received this message but was using a FUSE filesystem that was physically remote but appeared as a local disk to the system?" There doesn't seem to be any advice given as to what to do if you're not using a local disk. So, yes, all-in-all, the user is left with no clear idea what the message means, nor whether it really affects him, nor what to do about it. So anything you can do to improve this situation would be A Good Thing.

Revision history for this message
In , Marcel-wiesweg (marcel-wiesweg) wrote :

Any better suggestions for the message?
The technical background is that Solid does not provide information for such storage devices, so in fact we dont now what it is and fall back to the mount path.
This can happen is Solid/HAL does not support the local setup - as I would suspect for the LVM mentioned above. This should be fixed in HAL.
The problem can also happen when Solid is not working correctly, which is a platform or installation issue.
It also covers all other cases, which we did not expect and which I dont mention here therefore.

Revision history for this message
In , Marcel-wiesweg (marcel-wiesweg) wrote :

SVN commit 1086098 by mwiesweg:

Apply the same fix as for CollectionManager in the setup code as well
(this code test not-yet-added collections, which are unknown to collectionmanager)

BUG: 221155

 M +2 -1 NEWS
 M +10 -5 utilities/setup/setupcollectionview.cpp

WebSVN link: http://websvn.kde.org/?view=rev&revision=1086098

Changed in digikam:
status: Confirmed → Fix Released
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Should be really fixed in the latest release.

Changed in digikam (Ubuntu):
status: Triaged → Fix Released
Changed in digikam:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.