Bug 412411

Summary: Spectacle adds a 25 after a % in the save location when apply is set
Product: [Applications] Spectacle Reporter: supercockgamer
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: amdev1, kde, mr-peipei, noahadvs
Priority: NOR    
Version: 19.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screen shot of the issue

Description supercockgamer 2019-09-27 22:47:19 UTC
Created attachment 122911 [details]
screen shot of the issue

SUMMARY
Spectacle adds a 25 after a % in the save location when apply is set

STEPS TO REPRODUCE
1. Go to Spectacle >> configure... >> save >> save location 
2. put a % in the path to add a variable and apply
3. when opening the config again there will be a 25 after any % symbol, apply again without changing will add another 25 after any % 

OBSERVED RESULT
in the save location will be a 25 after any % symbol

EXPECTED RESULT
not having the 25 after the % after saving

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1
Kernel Version: 5.3.1-arch1-1-ARCH
OS Type: 64-bit
Processors: 4 × Intel® Core™ i3-5005U CPU @ 2.00GHz
Memory: 7.7 GiB
Comment 1 Alex 2019-10-03 03:47:53 UTC
If you take a closer look it says you can specify subfolders in the filename instead with /, for example %Y-%M/Screenshot_%Y%M%D_%H%m%S

The UI says you can use placeholders in the filename, not location. Seems fine to me.
Comment 2 Felipe Peter 2019-10-04 07:32:49 UTC
But if you want to save your screenshots to ~/%foo, so be it. Spectacle should not add random stuff to the path every time you click "OK".
Comment 3 Alex 2019-10-04 18:05:47 UTC
(In reply to Felipe Peter from comment #2)
> But if you want to save your screenshots to ~/%foo, so be it. Spectacle
> should not add random stuff to the path every time you click "OK".

True, I misunderstood the bug report.
Comment 4 Alex 2019-10-21 03:30:44 UTC
Seems to be related to the KUrlRequester widget from KIO, for example a similar bug also occurs when editing an item from "Places" where that widget is used too.

The documentation for its url() method says it "may be malformed, if the user entered something weird". But a directory containing a % should be fine, right?
Comment 5 Noah Davis 2023-11-30 15:17:43 UTC
This seems to be fixed.