Bug 364975

Summary: KDE file selector return files with two consecutive spaces as '%20 '
Product: [Applications] kfile Reporter: Hans-Peter Jansen <hpj>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: test program
test file

Description Hans-Peter Jansen 2016-07-01 12:27:59 UTC
I encountered a strange behaviour tonight within a PyQt4 program, that boils down to:
with Qt4's KDE integration, the usual file selector dialogs are replaced with KDEs (all for good!).
Using QtGui.QFileDialog.getOpenFileNames to select a single file containing two consecutive spaces is fine, but if at least two files are selected and one contains two consecutive spaces, the first space is replaced with %20.


Reproducible: Always

Steps to Reproduce:
1. install python-qt4 or python3-qt4
2. put both attached files in a directory
3. run python{,3} ./fileselector-test.py
4. select the 'file  with  two  spaces.txt' file: all is well
5. select both files, result is:
Selected files:

/home/hp/tmp/filselector-test/fileselector-test.py
/home/hp/tmp/filselector-test/file%20 with%20 two%20 spaces.txt


Actual Results:  
The filenames are mangled under described conditions, and therefore inaccessible

Expected Results:  
The filenames should come out unchanged and accessible

I think, that this is pretty severe as a bug in a core component, but refrain from raising severity.
Nevertheless, this should be fixed soon.
Comment 1 Hans-Peter Jansen 2016-07-01 12:29:50 UTC
Created attachment 99782 [details]
test program

This is compatible with PyQt4 with python2.7 and python3.x
Comment 2 Hans-Peter Jansen 2016-07-01 12:30:58 UTC
Created attachment 99783 [details]
test file
Comment 3 Nate Graham 2018-04-10 21:54:47 UTC
Qt4 is unsupported.