Bug 366446 - Creating new albums fails due to invalid path name.
Summary: Creating new albums fails due to invalid path name.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (show other bugs)
Version: 5.1.0
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-05 12:22 UTC by Ian Dall
Modified: 2019-03-23 14:58 UTC (History)
3 users (show)

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


Attachments
Screenshot after creating album (123.95 KB, image/png)
2016-08-05 17:01 UTC, swatilodha27
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Dall 2016-08-05 12:22:53 UTC
Git Rev.: e22a2467c80e2b541e5debff76f84d9d70ce057d

Creating a new album fails due to an invalid pathname. For example, I have an album root at /var/media/photos. There is an existing Album at /var/media/photos/imports. When I try and create an Album "2016-08-05" as a child of imports, I get an error message: Failed to create directory 'file:///imports/2016-08-05'. 

That is to say, digikam is attempting to create /imports/2016-08-05 when it should be trying to create /var/media/photos/imports/2016-08-05, and failing because /imports doesn't exist.

This also affects creating new albums at import time.

Browsing existing Albums seems to work fine.

Reproducible: Always

Steps to Reproduce:
1.Select an existing album (or root)
2.Use Album->New
3.Use the "Child of: Selected Album" option, click OK.

Actual Results:  
An error message such as Failed to create directory 'file:///New Album'

Expected Results:  
A new album to be created.

Using strace confirms that the wrong path is sent to the operating system: mkdir("/imports/2016-08-05", 0777)      = -1 ENOENT (No such file or directory).
Comment 1 swatilodha27 2016-08-05 17:01:58 UTC
Created attachment 100470 [details]
Screenshot after creating album

This issue is not at all reproducible. Creating an album works perfectly fine. I followed exactly the same you mentioned and album is created successfully.

I had an existing album at home/Pictures/Test Album and I have created a child of Test Album at  home/Pictures/Test Album/2016-08-05 successfully.

Did you use MySQL or SQLite? I recommend to try again with fresh DB.
Comment 2 Maik Qualmann 2016-08-05 18:09:17 UTC
The same here, is not to reproduced. If "/var/media/photos" an external removable drive?

Maik
Comment 3 swatilodha27 2016-08-05 22:25:05 UTC
Can I close this file?
Comment 4 Ian Dall 2016-08-06 00:38:10 UTC
It is MySQL. /var/media/photos is on a NFS drive.
Comment 5 Ian Dall 2016-08-06 01:13:00 UTC
I noticed the path in AlbumRoots is %2Fvar%2Fmedia%2Fphotos.

Changing this in the database to /var/media/photos and restarting digikam fixes the problem.

The %2F it must have been created by a previous versions of digikam, so I think this is still an issue but it is an upgrade issue rather than an AlbumsView issue.
Comment 6 caulier.gilles 2016-08-06 05:36:01 UTC
The problem with the encoding path is already reported to bug #365313

*** This bug has been marked as a duplicate of bug 365313 ***
Comment 7 caulier.gilles 2019-03-23 14:58:15 UTC
Not reproducible with 6.1.0

Gilles Caulier