https://bugs.kde.org/show_bug.cgi?id=372768
Bug ID: 372768
Summary: Files not copied after skipping directory
Product: frameworks-kio
Version: 5.28.0
Platform: openSUSE RPMs
OS: Linux
Status: UNCONFIRMED
Severity: major
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
1. Start with a directory structure like the following in two places (e.g. home
and on a flash drive for backups, or two different directories in home) that
I'll call D1/ and D2/:
projects/
project/
(potentially some files)
project 2/
(potentially more files)
project 3.txt
2. Copy D1/projects/ to D2/ (copy-paste or drag-drop both behave the same)
3. Get a "Folder already exists" dialog for projects/, and choose "Write Into"
4. Get a "Folder already exists" for projects/project/, and choose "Skip"
5. Fail to get any "Folder already exists" dialog for projects/project 2/ or
"File already exists" dialog for projects/project 3.txt, and neither are
copied.
Steps 2 and 3 can be replaced with simply copying D1/projects/* to
D2/projects/. I've tried this in Dolphin, although it will probably happen in
anything else using KIO.
I did a little digging into the cause, and it seems to be because directory
paths in CopyJobPrivate::m_skipList sometimes don't have a trailing slash –
CopyJobPrivate::shouldSkip() is checking for paths that start with a path in
m_skipList, and without the slash it matches anything similarly named instead
of just that particular directory's contents.
CopyJobPrivate::slotResultCreatingDirs() adds the slash if needed before adding
a path to m_skipList, while CopyJobPrivate::slotResultConflictCreatingDirs()
does not.
--
You are receiving this mail because:
You are watching all bug changes.