Bug 443618 - "Compile and Run Cpp" doesn't work if the path contains any spaces.
Summary: "Compile and Run Cpp" doesn't work if the path contains any spaces.
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-11 23:56 UTC by felipelorenzzon
Modified: 2021-11-07 15:13 UTC (History)
1 user (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 felipelorenzzon 2021-10-11 23:56:17 UTC
SUMMARY
cannot compile cpp if the path has any space. 


STEPS TO REPRODUCE
1. create a directory containing a space
2. create any .cpp inside it
3. use tools>external tools>tools>compile and run cpp

OBSERVED RESULT

Compilation fails. The argument given to g++ lacks quotation marks around the paths.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.14.10-1-MANJARO (64-bit)
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

I believe this is solved by adding the quotation marks in the arguments inside the file /kate/addons/externaltools/externaltools-config/compile_and_run_cpp.
Comment 1 felipelorenzzon 2021-10-11 23:58:34 UTC
This problem is also present if I compile Kate from source in KDE Neon.
Comment 2 Thiago Sueto 2021-11-06 22:25:03 UTC
Can confirm. I think this is fix is trivial: simply enclosing all variables in "".
Comment 3 Bug Janitor Service 2021-11-06 22:45:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/512
Comment 4 Thiago Sueto 2021-11-07 15:13:51 UTC
Git commit c710090c45fb5bb7b1a95bdd955139c611cfd278 by Thiago Sueto.
Committed on 06/11/2021 at 22:42.
Pushed by cullmann into branch 'master'.

Fix compile cpp when path has spaces

M  +1    -1    addons/externaltools/externaltools-config/compile_and_run_cpp

https://invent.kde.org/utilities/kate/commit/c710090c45fb5bb7b1a95bdd955139c611cfd278