You have been subscribed to a public bug:

"This report was produce with the help of ChatGPT (Astra)"

Deleting a directory tree with Shift+Delete in Dolphin stops with “Could
not delete file [path]”. However, the reported file has already
disappeared, and its parent directory is empty.

A separate Qt-based test reproduced duplicate enumeration of an already-
deleted file on the affected NTFS3 volume. The same test completed
successfully on the internal ext4 filesystem.

Environment

Ubuntu 24.04.5 LTS
Linux kernel: 7.0.0-34-generic
Dolphin package: 4:23.08.5-0ubuntu4
KIO: 5.115.0-0ubuntu6
Qt runtime: 5.15.13
External USB volume: NTFS, mounted using ntfs3
Internal filesystem used for comparison: ext4

Steps to reproduce in Dolphin
On the external NTFS volume, select a directory containing many files and 
nested subdirectories.
Press Shift+Delete and confirm permanent deletion.
Dolphin stops with “Could not delete file [path]”.
Inspect the reported location: the file is gone and its parent directory is 
empty.
Close and reopen Dolphin, refresh with F5, and retry deletion of the remaining 
tree.
The operation stops again on a different file, which is also gone afterward.
No manual deletion took place between the error message and checking the 
reported location.

Expected result
The entire selected directory tree should be deleted successfully.

Actual result
Deletion partially completes and then aborts. Empty subdirectories and the 
remaining tree are left behind.

Independent reproduction
Astra has created a Python/PyQt5 script to creates its own temporary tree 
containing 2,400 small files: 15 branches with 160 files each. It uses 
QDirIterator with recursive traversal and removes each file with 
QFile.remove(), following the enumeration-and-deletion pattern in KIO 5.115.0 
FileProtocol::deleteRecursive(). (I have the script if you need it.)

Observed results:
Internal ext4 filesystem: all 2,400 files removed without error.
External NTFS3 volume: 160 files removed successfully, followed by a duplicate 
path returned by the iterator.

Duplicate path: 0/a/b/c/d/e/fichier-0134.txt
That path had already been processed and no longer existed before the failed 
removal.
QFile error: “No such file or directory”.

The script cleans up its own temporary directory. It does not delete
existing user files. It requires Python 3 and PyQt5; pass a test
filesystem’s directory as its sole argument.

Assessment
This suggests an interaction between enumeration during deletion and NTFS3, 
with KIO aborting when removal of an already-deleted entry fails. It does not 
establish whether the underlying cause belongs to KIO, Qt, or NTFS3.

Please advise whether this matches an existing issue or should be
reassigned to another component.

** Affects: ubuntu
     Importance: Low
         Status: Incomplete

-- 
Recursive deletion on NTFS3 aborts on an already-deleted file — duplicate entry 
observed with QDirIterator
https://bugs.launchpad.net/bugs/2168802
You received this bug notification because you are a member of Ubuntu Bugs, 
which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to