| Summary: | Can't import network share with non-ascii character in path | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | wojciech.binek |
| Component: | Setup-Database | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | caulier.gilles, metzpinguin |
| Priority: | NOR | ||
| Version First Reported In: | 5.8.0 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | https://commits.kde.org/digikam/8490cd2b9c459b549753563274d8a7d630567395 | Version Fixed/Implemented In: | 5.9.0 |
| Sentry Crash Report: | |||
| Attachments: | Collections window with path with non-ascii character. | ||
What's the expected no ascii cararacters used in your path to reproduce the problem ? Gilles Caulier I had problems with polish characters 'ó' and 'ę', but I think that others will be problematic too. I also noticed that when the characters are not in the base of the path the subpath is added correctly: 1. When I add "Z:/Zdjecia/_Wakacje - wspólne" - error 2. When I add "Z:/Zdjecia/" - no error and automatically adds subpath "_Wakacje - wspólne" 3. When I add "Z:/Zdjęcia/" (ę instead of e) - error Created attachment 111335 [details]
Collections window with path with non-ascii character.
The same path is set for local and network collection. For local it is ok, for network there is an error.
The cause is here. Why too toLocal8Bit()? I fix it tonight.
QStringList CollectionManagerPrivate::networkShareMountPathsFromIdentifier(const AlbumRootLocation* location)
{
// using a QUrl because QUrl cannot handle duplicate query items
QUrl url = QUrl::fromEncoded(location->identifier.toLocal8Bit());
if (url.scheme() != QLatin1String("networkshareid"))
{
return QStringList();
}
return QUrlQuery(url).allQueryItemValues(QLatin1String("mountpath"));
}
Maik
Git commit 8490cd2b9c459b549753563274d8a7d630567395 by Maik Qualmann. Committed on 12/03/2018 at 20:05. Pushed by mqualmann into branch 'master'. fix access to non-ascii character in the network share path Related: bug 380220 FIXED-IN: 5.9.0 M +3 -1 NEWS M +1 -1 libs/database/collection/collectionmanager.cpp https://commits.kde.org/digikam/8490cd2b9c459b549753563274d8a7d630567395 The 5.9.0 pre-release installer is updated with last fix from Maik. Please try and report : https://files.kde.org/digikam/ I tested the new version on couple of folders and it seems ok now. Thanks! |
I try to set digikam with external MySQL database to search for files on SMB share. When I try to add a collection on network share with non-ascii character I get following error in console: [3876] digikam.general: No DB settings changes. Do nothing... [3876] digikam.database: addLocation QUrl("file:///Z:/Zdjecia/_Wakacje - wspólne") [3876] digikam.database: Creating new Location "/" uuid "networkshareid:?mountpath=Z:/Zdjecia/_Wakacje - wspólne" [3876] digikam.database: location for "Z:/Zdjecia/_Wakacje - wsp?lne" is available false When I add the same path as local storage it is added properly. I checked the db entery and the path is ok there. I also tested other db backends and the problem appeared on all of them. Steps to reproduce: 1) Add network collection path with non-ascii character Actual Results: Error, collection not added Expected Results: New collection added Build: Jan 10 2018 digiKam 5.8.0