Bug 364975 - KDE file selector return files with two consecutive spaces as '%20 '
Summary: KDE file selector return files with two consecutive spaces as '%20 '
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kfile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-01 12:27 UTC by Hans-Peter Jansen
Modified: 2018-04-10 21:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test program (933 bytes, text/x-python)
2016-07-01 12:29 UTC, Hans-Peter Jansen
Details
test file (6 bytes, text/plain)
2016-07-01 12:30 UTC, Hans-Peter Jansen
Details

Note You need to log in before you can comment on or make changes to this bug.
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.