Bug 319407

Summary: Kate(part) changes filenames to lowercase
Product: [Unmaintained] kde-windows Reporter: Geert Lamers <bugs.kde>
Component: network and filesAssignee: Patrick Spendrin <ps_ml>
Status: RESOLVED FIXED    
Severity: grave CC: f.esser, michel.ludwig, ps_ml
Priority: NOR    
Version: 4.10   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Geert Lamers 2013-05-06 10:05:50 UTC
The Kate editor (or KWrite) on Windows changes filenames to lowercase when saving a file. This happens since I updated to 4.10.2.

This is especially annoying since Windows pretends to be case-insensitive, so Windows Explorer makes it impossible to change the filename back.

I can't really try if this also happens with other applications, because I don't have much installed other than Kate.

Reproducible: Always

Steps to Reproduce:
1. Open a textfile with capitals in the filename in Kate (or a Katepart texteditor)
2. Press "Save file"
Actual Results:  
The filename is changed to lowercase.

Expected Results:  
The file retains the capitals in its filename

Windows 7 SP1
Comment 1 Florian Eßer 2013-05-06 10:15:36 UTC
I can confirm that for KDevelop (built from git).
This is especially annoying when editing files like CMakeLists.txt
Comment 2 Michel Ludwig 2013-05-06 10:54:37 UTC
I had investigated this some time ago, and if I remember correctly the problem is caused by
'GetFullPathNameW' in 'KStandardDirs::realFilePath(const QString &filename)' which is used from 'KSaveFile::setFileName', which in turn is used from 'TextBuffer::save'.
Comment 3 Patrick Spendrin 2013-05-08 21:37:29 UTC
Git commit f247c72618250ac1707bc68e0d498391c4dda6b7 by Patrick Spendrin.
Committed on 08/05/2013 at 23:34.
Pushed by sengels into branch 'kde-4.10'.

fix casing of realFilePath

This fixes an issue in kate where files of any case would all be saved as
lower case; on the other hand this might break behaviour where casing
might not be wanted to compare if files are identical. Please report such
bugs.

A  +12   -0    portage/kde/kdelibs/fix-casing-of-realFilePath.diff
M  +2    -1    portage/kde/kdelibs/kdelibs-20110130.py
M  +12   -0    portage/kde/kdelibs/kdelibs-4.10.2-20130430.diff

http://commits.kde.org/emerge/f247c72618250ac1707bc68e0d498391c4dda6b7
Comment 4 Patrick Spendrin 2013-05-10 20:08:46 UTC
ok, the kdelibs package has been rebuild & uploaded. Please update with kdewin-installer in package manager mode to kdelibs package version 4.10.2-1 .
I will close this bug as soon as I have pushed the required changes upstream.
Comment 5 Patrick Spendrin 2013-05-10 20:17:57 UTC
Git commit b49a27f99dc20db07d36e12572bfebfaaab92dee by Patrick Spendrin.
Committed on 10/05/2013 at 22:15.
Pushed by sengels into branch 'KDE/4.10'.

fix casing of realFilePath

until now, realFilePath returned a lower case path instead of keeping the
correct case. This fixes an issue in kate where files of any case would all be saved as lower case.

M  +1    -1    kdecore/kernel/kstandarddirs.cpp

http://commits.kde.org/kdelibs/b49a27f99dc20db07d36e12572bfebfaaab92dee