Fix upper/lower case rename on case insensitive fs
ClosedPublic

Authored by hoffmannrobert on Feb 28 2019, 4:02 PM.

Details

Summary

Fixes wrong temp file creation (missing '/' at
relative root of mounted fs).

Test Plan

Mount a CIFS share e.g. at /mnt/share with option
'nocase'. In dolphin, go there and create a file
'foo' (i.e. /mnt/share/foo).
Try to rename it to 'Foo': Without this patch a
dialog pops up telling you about overwriting the file.
With this patch applied it will correctly be renamed.

Create a directory 'subdir' below /mnt/share.
In dolphin, change there and create a file 'foo'
(i.e. /mnt/share/subdir/foo).
Try to rename it to 'Foo': no problem with and without
this patch.

Diff Detail

Repository
R241 KIO
Branch
fix_case_rename
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9116
Build 9134: arc lint + arc unit
hoffmannrobert created this revision.Feb 28 2019, 4:02 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 28 2019, 4:02 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
hoffmannrobert requested review of this revision.Feb 28 2019, 4:02 PM
chinmoyr requested changes to this revision.Mar 2 2019, 4:53 PM
chinmoyr added inline comments.
src/core/copyjob.cpp
1908

IMO QDir isn't required here. QLatin1String("/kio_xxxxxx") is sufficient.

This revision now requires changes to proceed.Mar 2 2019, 4:53 PM
dfaure requested changes to this revision.Mar 3 2019, 12:12 AM

Indeed, "just" a missing slash.

Porting error in my commit bbf6181f4de7bc315c7c64e7528a3150788eea09 7 years ago (!)
I removed KUrl::AppendTrailingSlash and didn't actually a '/' :(

QDir not required, just add '/'

hoffmannrobert marked an inline comment as done.Mar 3 2019, 10:03 AM
dfaure accepted this revision.Mar 3 2019, 10:07 AM

Thanks.

chinmoyr accepted this revision.Mar 6 2019, 3:26 PM
This revision is now accepted and ready to land.Mar 6 2019, 3:26 PM

Could you please land it for me, I don't have commit access. Thanks.

This revision was automatically updated to reflect the committed changes.