Bug 254549 - When using dolphin action to compare files that has $ in the name, Kompare will open the file without that character.
Summary: When using dolphin action to compare files that has $ in the name, Kompare wi...
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.9.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2010-10-18 16:19 UTC by Fahad Alduraibi
Modified: 2018-05-03 21:23 UTC (History)
2 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 Fahad Alduraibi 2010-10-18 16:19:01 UTC
Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

Let said you have two files (in the same or different folders) and at least one of those files has a dollar sign followed by a number or letter in the file name (e.g. test$1.txt or test$z.foo) and you selected both in dolphin and did a compare, Kompare will try to open open that file without that $x (e.g. the files will be test.txt or text.foo)

I think dolphin is stripping those before passing the names to kompare, since when opening the files directly from kompare it works just fine.

I tested different symbols such as ! @ #  % &, but it seems that only $ is getting stripped.
If $ was the last character in the file name it will still work fine (e.g. test$.foo)

If you happen to have a file with a similar name after the stripped file kompare will open that instead. (e.g. I have test.foo and test$1.foo, so kompare will open test.foo)

Dolphin v1.4

Reproducible: Always

Steps to Reproduce:
Create two different files and name them:
test.foo
test$1.foo

from dolphin select both files and from Tools do "Compare Files"

Actual Results:  
Kompare will report that files are identical since it was comparing test.foo to itself after the $1 got stripped from the second file name.

Expected Results:  
Kompare should open the two files correctly and they are different.
Comment 1 Frank Reininghaus 2010-10-19 22:53:12 UTC
Thanks for the bug report! I could reproduce the issue in trunk.

The problem is most likely not in Dolphin itself because I'm getting the following correct debug output:

dolphin(7883)/kio (KRun) KRun::runCommand: runCommand  "kompare -c "/home/kde-devel/tmp/testfile.txt" "/home/kde-devel/tmp/testfile$1.txt"" , "Kompare"

The root cause of the bug might be somewhere in kdelibs.
Comment 2 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:20:03 UTC
Resetting assignee to default as per bug #305719
Comment 3 Frank Reininghaus 2012-10-31 22:27:03 UTC
Even bash "strips" the $1 from the name because it's considered an empty variable. Nonetheless, I'll reassign to KIO - I don't know if it's possible there to do something about it.
Comment 4 Nate Graham 2018-05-03 21:23:38 UTC
Works for me in KDE Frameworks 5.45.