Fix upper/lower case rename on case insensitive fs
ClosedPublic

Authored by hoffmannrobert on Thu, Feb 28, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hoffmannrobert created this revision.Thu, Feb 28, 4:02 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, Feb 28, 4:02 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
hoffmannrobert requested review of this revision.Thu, Feb 28, 4:02 PM
chinmoyr requested changes to this revision.Sat, Mar 2, 4:53 PM
chinmoyr added inline comments.
src/core/copyjob.cpp
1917

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

This revision now requires changes to proceed.Sat, Mar 2, 4:53 PM
dfaure requested changes to this revision.Sun, Mar 3, 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.Sun, Mar 3, 10:03 AM
dfaure accepted this revision.Sun, Mar 3, 10:07 AM

Thanks.

chinmoyr accepted this revision.Wed, Mar 6, 3:26 PM
This revision is now accepted and ready to land.Wed, Mar 6, 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.