Bug 402938 - Rename album an within album property fails when a subalbum exists
Summary: Rename album an within album property fails when a subalbum exists
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-TreeView (show other bugs)
Version: 5.9.0
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-06 19:35 UTC by Loukournan29
Modified: 2020-04-04 06:57 UTC (History)
1 user (show)

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


Attachments
Video showing the issue (1.37 MB, video/mp4)
2019-01-10 14:02 UTC, Loukournan29
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Loukournan29 2019-01-06 19:35:15 UTC
SUMMARY
Rename album an within album property fails when a subalbum exists

STEPS TO REPRODUCE
1. Edit the properties of an album containing a subalbum
2. Modify the album name, then click on Ok

OBSERVED RESULT
1. A warn dialog indicates that the renaming as failed, and close the dialog box
2. The photographs are not available any more within Digikam (switch albums to check), and the album is not renamed.
3. The photographs files are still available in the file manager, and the directory is not renamed
4. Rename again the album, but with the rename option. The warning is displayed again. The album is renamed, but the corresponding directory. The photograph are not available.
5. Rename again the album to the initial name. The renaming succeed, and the photographs are available again.

Note : The album renaming with rename option has quite the same issue.



EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: Windows 7
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2019-01-06 21:10:33 UTC
I can not reproduce the problem here. The problem can occur under Windows if the album or a sub-album is opened by another program and is thus blocked. In general, renaming with sub albums should work without problem.

Maik
Comment 2 Maik Qualmann 2019-01-06 21:43:24 UTC
Git commit 8a12004bf0b543b2f09b79ad12b35d0d5c73b3da by Maik Qualmann.
Committed on 06/01/2019 at 21:40.
Pushed by mqualmann into branch 'master'.

rename album only if renaming the folder was successful

M  +6    -7    core/libs/album/manager/albummanager_palbum.cpp

https://commits.kde.org/digikam/8a12004bf0b543b2f09b79ad12b35d0d5c73b3da
Comment 3 Loukournan29 2019-01-07 08:45:00 UTC
I reproduce this issue every try on Windows. There is no other application using the folder or the subfolder.

I will play this test on Linux soon.
Comment 4 Maik Qualmann 2019-01-08 20:57:30 UTC
I can not reproduce the problem on a real Win7 machine and also not on 2 virtual Win7 / Win10 machines. Do they run a specific anti-virus software?

Maik
Comment 5 Loukournan29 2019-01-10 14:01:14 UTC
(In reply to Maik Qualmann from comment #4)
> I can not reproduce the problem on a real Win7 machine and also not on 2
> virtual Win7 / Win10 machines. Do they run a specific anti-virus software?
> 
> Maik

I reproduce the issue with my 2 win7 machine. I tried with album associated with a local homegroup folder (my first try) and with a ordinary harddrive folder.
The home group folder is set but not used over the network for the try (the clients was off). The anti-virus is Avira (freeware version).

I reproduce the issue with another win7-pro machine and recorded the display (attached). The anti-virus is Kaspersky.

Paul
Comment 6 Loukournan29 2019-01-10 14:02:31 UTC
Created attachment 117380 [details]
Video showing the issue
Comment 7 Maik Qualmann 2019-01-10 18:39:20 UTC
I can reproduce that if the folder to be renamed has an extended network share on Windows, then it can not be renamed. We will not be able to detect or prevent this with the resources available with the Qt-API. Remove the network share or add it to a folder higher.

Maik
Comment 8 Loukournan29 2019-01-11 09:24:20 UTC
(In reply to Maik Qualmann from comment #7)
> I can reproduce that if the folder to be renamed has an extended network
> share on Windows, then it can not be renamed. We will not be able to detect
> or prevent this with the resources available with the Qt-API. Remove the
> network share or add it to a folder higher.
> 
> Maik

Would I use a network collection for this kind of folder ? Network folder renaming is an avaible feature within the file manager. It is surprising that Qt-API can't manage it.
Comment 9 Maik Qualmann 2020-04-03 19:36:37 UTC
Git commit d85733a8f64d1ba4f5067a9c190b094b2b353781 by Maik Qualmann.
Committed on 03/04/2020 at 19:34.
Pushed by mqualmann into branch 'master'.

try to fix locked file operations under Windows
do not add QFileSystemWatcher to images in the cache
Related: bug 417737

M  +5    -0    core/libs/threadimageio/fileio/loadingcache.cpp

https://invent.kde.org/kde/digikam/commit/d85733a8f64d1ba4f5067a9c190b094b2b353781