Bug 474677 - Deleting files generates an error about permissions on .dtrash
Summary: Deleting files generates an error about permissions on .dtrash
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Trash (show other bugs)
Version: 8.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-19 02:20 UTC by jm7@acm.org
Modified: 2023-12-12 21:38 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jm7@acm.org 2023-09-19 02:20:01 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Repeat until fail
2. Select an image to edit and edit it.
3. Save and close the editor.
4. Delete the Original
5.  End Repeat

OBSERVED RESULT
After about 5 or 6 file deletions, I get a message about permissions on .dtrash.  A reboot of the machine seems to fix the problem for a further 5 or 6 images.  Since I have hundreds of photos that I have to trim and color correct, this is getting old fast.  This was working better yesterday and there has not been any change to the system except for more images in the database.

EXPECTED RESULT
Moving files to trash should be seamless.

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

ADDITIONAL INFORMATION

Build date: 9/14/2023 5:03 AM (target: RelWithDebInfo)
Revision: 570beca211ea0a294243aa46c06f3d3cb8dbf7e5
Branch: master
Comment 1 jm7@acm.org 2023-09-19 03:06:50 UTC
Found an anomaly that seems to have caused the problem.  Unfortunately, this only pushes the problem back a level, and does not fix it.

I discovered that there were about 1700 files in .dtrash\info that did not have a counterpart in .dtrash\files.  Telling  digikam to empty the trash, and then deleting all files in .dtrash\info may have resolved the problem for now.  The real question is how it got into that state in the first place.
Comment 2 Maik Qualmann 2023-09-19 05:57:16 UTC
It is possible that the dtrash info files could not be deleted in the past due to rights issues. We are currently making a change here in digiKam and have set a permission that should grant rights to all users. There was also a fix for the .drash folder creation. Previously, the files and info folders were not created if .dtrash already existed. Do different users use the collection and therefore .dtrash for you?

Maik
Comment 3 caulier.gilles 2023-10-15 03:03:32 UTC
@jm7@acm.org,

This problem still reproducible with the new digiKam 8.2.0 pre-release Windows
installer available at usual place:

https://files.kde.org/digikam/

This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110.

Thanks in advance

Dilles Caulier
Comment 4 caulier.gilles 2023-11-20 16:30:01 UTC
jm7@acm.org,

Do you seen the Question from Maik in comment #2

Gilles Caulier
Comment 5 Maik Qualmann 2023-12-12 21:38:39 UTC
Git commit 7495d6e228376529cb933ed65b2fbfe2794e5142 by Maik Qualmann.
Committed on 12/12/2023 at 22:37.
Pushed by mqualmann into branch 'master'.

rewrite code to create trash folder structure
Related: bug 478034
FIXED-IN: 8.3.0

M  +2    -2    NEWS
M  +10   -13   core/libs/dtrash/dtrash.cpp

https://invent.kde.org/graphics/digikam/-/commit/7495d6e228376529cb933ed65b2fbfe2794e5142