Bug 208851 - Collections: Detection of duplicate collections too strict [patch]
Summary: Collections: Detection of duplicate collections too strict [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Setup-Database (show other bugs)
Version: 1.0.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-29 10:14 UTC by Michael G. Hansen
Modified: 2017-07-25 19:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0
Sentry Crash Report:


Attachments
Patch against r1028026, use KUrl::parentOf (1.18 KB, patch)
2009-09-29 10:14 UTC, Michael G. Hansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael G. Hansen 2009-09-29 10:14:12 UTC
Version:           1.0.0-beta5 (using KDE 4.3.1)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Assume I have a network collection under /mnt/shares/pics. Then adding /mnt/shared/pics-new is rejected with the message "There is already a collection for a network share with the same path" although the new share is a sibling, not a child. On the other hand, adding /mnt/shares is not detected as being a parent to /mnt/shared/pics

Current codes checks if the path for a new collection is contained in the path to existing collections. Attached patch uses KUrl::parentOf instead, and checks relations in both directions (new.parentOf(old) and old.parentOf(new)).
Comment 1 Michael G. Hansen 2009-09-29 10:14:53 UTC
Created attachment 37232 [details]
Patch against r1028026, use KUrl::parentOf
Comment 2 caulier.gilles 2009-09-29 10:18:49 UTC
Marcel,

Patch is simple and sound fine for me... Your viewpoint ? No problem here for you ?

Gilles
Comment 3 Marcel Wiesweg 2009-09-29 18:58:41 UTC
Fine for me
Comment 4 Michael G. Hansen 2009-09-30 06:26:34 UTC
SVN commit 1029537 by mghansen:

Improve checks for existing collections when adding new ones.

BUG: 208851


 M  +2 -1      NEWS  
 M  +10 -3     libs/database/collectionmanager.cpp  


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