https://bugs.kde.org/show_bug.cgi?id=524775
Bug ID: 524775
Summary: SMB KIO worker truncates filenames at colon (:) and
silently writes 0-byte files; move operation deletes
source file with total data loss and no error
Classification: Frameworks and Libraries
Product: kio-extras
Version First 26.04.3
Reported In:
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: major
Priority: NOR
Component: Samba
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
Created attachment 195489
--> https://bugs.kde.org/attachment.cgi?id=195489&action=edit
full reproduction
STEPS TO REPRODUCE
1. On the local filesystem, create files whose names contain a colon, e.g.:
file1:aaa.txt, file1:bbb.txt, file2:aaa.txt, file2:bbb.txt (each with some
content)
2. Open two Dolphin windows/tabs:
a) smb://<nas-ip>/<share>/<path>/ (accessed via the smb:// KIO worker)
b) the same share, but mounted locally (e.g. via fstab/gvfs) and browsed
through its local mount path
3. Copy one of the colon-named files from the local source folder into the
smb:// window (a).
4. Copy the same/another colon-named file into the locally-mounted window (b).
5. Move (not copy) another colon-named file from the local source folder
directly into the smb:// window (a).
OBSERVED RESULT
- Step 3 (copy via smb://): destination filename is truncated at the colon
(e.g. "file1:aaa.txt" becomes "file1"), and the resulting file is 0 bytes.
No error or warning is shown.
- In some cases the colon is instead replaced with a non-printing/control
character in the filename rather than being truncated, but content is preserved
in this case (inconsistent behavior for what should be the same operation).
- Step 4 (copy via local mount path): filename and content are both handled
correctly (colon is presumably escaped/mapped by the underlying mount), proving
the SMB server and share itself support these filenames fine.
- Step 5 (MOVE via smb://): the source file is deleted from the local folder as
normal, but the destination on the SMB share ends up truncated AND 0 bytes. The
result is complete, silent, unrecoverable data loss - no error dialog appears,
so this is easy to miss when moving many files.
EXPECTED RESULT
Either the colon should be transparently escaped/mapped when writing to SMB (as
happens via the local mount),
or, if colons are genuinely unsupported for the target share,
Dolphin/kio-extras should show an error
and abort the operation (especially for MOVE) rather than deleting the source
and writing an empty/truncated file at the destination.
SOFTWARE/OS VERSIONS
Dolphin: 26.04.3
KDE Frameworks: 6.29.0
Qt: 6.11.1
Plasma: 6.7.4
OS: Fedora Linux 44 (KDE Plasma Desktop Edition), Wayland
Kernel: 7.1.8-200.fc44.x86_64
SMB server: Synology NAS
ADDITIONAL INFORMATION
Screen recording attached showing the full reproduction, including a
side-by-side comparison between smb:// and the local mount, and the final
0-byte truncated file after the move operation ("file2 (Unknown, 0 B)").
--
You are receiving this mail because:
You are watching all bug changes.