Bug 271651 - 2.0 beta4 can't use network shares
Summary: 2.0 beta4 can't use network shares
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Media (show other bugs)
Version: 2.0.0
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-24 23:50 UTC by Jonas Norlander
Modified: 2017-07-26 04:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments
Debug output (5.79 KB, text/plain)
2011-04-24 23:50 UTC, Jonas Norlander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Norlander 2011-04-24 23:50:35 UTC
Created attachment 59285 [details]
Debug output

Version:           2.0.0 (using KDE 4.6.2) 
OS:                Linux

With Digikam 2.0 beta4 I can't use my network collection on NFS/CIFS network share anymore.
Adding the path as a local or a removable collection works.
Email thread:
http://mail.kde.org/pipermail/digikam-users/2011-March/012721.html

Reproducible: Always

Steps to Reproduce:
Try to create a Network Collection on a mounted NFS/CIFS share.

Actual Results:  
A dialog window saying it can't create the collection.
Comment 1 caulier.gilles 2011-04-25 21:54:00 UTC
Git commit 7adb7184f9f9c8c82eeb0d5b094ac8fb91018d7c by Matthias Welwarsky.
Committed on 25/04/2011 at 14:21.
Pushed by welwarsky into branch 'master'.

CollectionManager: fix for collections on network shares

QUrl default constructor expects an unencoded URL. If an encoded
URL is used, the '%' is again encoded and the resulting URL
is unusable. AlbumRootLocation::identifier seems to be already encoded,
therefore use the proper QUrl::fromEncoded() method.

Without this fix, existing collections on network shares are always
marked unavailable and new collections can not be generated.

Signed-off-by: Matthias Welwarsky <matze@welwarsky.de>

M  +1    -1    libs/database/collectionmanager.cpp

http://commits.kde.org/digikam/7adb7184f9f9c8c82eeb0d5b094ac8fb91018d7c

diff --git a/libs/database/collectionmanager.cpp b/libs/database/collectionmanager.cpp
index e2a4bbe..40e3e67 100644
--- a/libs/database/collectionmanager.cpp
+++ b/libs/database/collectionmanager.cpp
@@ -450,7 +450,7 @@ QString CollectionManagerPrivate::pathFromIdentifier(const AlbumRootLocation* lo
 QStringList CollectionManagerPrivate::networkShareMountPathsFromIdentifier(const AlbumRootLocation* location)
 {
    // using a QUrl because KUrl cannot handle duplicate query items
-    QUrl url(location->identifier);
+    QUrl url = QUrl::fromEncoded(location->identifier.toLocal8Bit());

    if (url.scheme() != "networkshareid")
    {
Comment 2 caulier.gilles 2011-04-25 21:54:56 UTC
Jonas,

Mattias has patched git master source code to trying to fix this problem. Please checkout source code and report.

Gilles Caulier
Comment 3 Jonas Norlander 2011-04-29 19:12:00 UTC
I try to don't mix my system with self compiled programs. If the fix is in beta 5 I will upgrade it from Philip's PPA.
Comment 4 Jonas Norlander 2011-05-07 06:35:16 UTC
Works fine in 2.0 beta 5 from Philips PPA for me.
Kubunty 11.04