Bug 267070 - kdialog have problems handling the # character when multi-selecting is used
Summary: kdialog have problems handling the # character when multi-selecting is used
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.14.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 280796 335922 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-24 18:05 UTC by Thomas Lindroth
Modified: 2018-05-13 12:00 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lindroth 2011-02-24 18:05:37 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

kdialog --multiple --getopenfilename will sometimes substitute spaces with %20 when the filenames contain the # characters.

Reproducible: Always

Steps to Reproduce:
run:
touch "Name #1"
touch "Name #2"
kdialog --multiple --getopenfilename .
select the two files

Actual Results:  
the output is:
/home/tholin/temp/Name%20#1 /home/tholin/temp/Name%20#2

Expected Results:  
the output should be:
/home/tholin/temp/Name #1 /home/tholin/temp/Name #2

This only happens when the filenames contain the # character and --multiple flag is used. The output is normal if I only select one of the files.
The problem might be related to bug 185433
Comment 1 Raphael Kubo da Costa 2017-12-29 15:27:58 UTC
*** Bug 335922 has been marked as a duplicate of this bug. ***
Comment 2 Raphael Kubo da Costa 2017-12-29 15:29:27 UTC
*** Bug 280796 has been marked as a duplicate of this bug. ***
Comment 3 Raphael Kubo da Costa 2017-12-29 15:53:21 UTC
This used to be a problem in kdelibs' KFileWidget due to its conversions between KUrl's and QString's in slotOk().

KFileWidget uses QUrl directly in KF5, so this is no longer an issue. I've tried kdialog here with inputs such as "foo  bar.txt" (which used to become "foo%20 bar.txt") and "foo #1.txt" and everything works as expected.