"Lock to Launcher" generates invalid .desktop file when path contains spaces

Bug #1652402 reported by niedzielski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity (Ubuntu)
New
Undecided
Unassigned

Bug Description

Unity v7.5.0+16.10.20160906.1-0ubuntu1
Ubuntu v16.10

Repro steps:
1. Open an app with spaces in the executable path that has no .desktop file
2. Right click the app icon in the launcher and click "Lock to Launcher"

Expected results:
A valid .desktop file is generated

Actual results:
A file like the following is generated in ~/.local/share/applications:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Salvage Solitude 8140 Configuration
Icon=salvagesolitude8140v0_6_x86_64.png
Path=/home/stephen/.config/itch/apps/Salvage Solitude 8140/SalvageSolitude8140v0.6 - Linux
Exec=/home/stephen/.config/itch/apps/Salvage Solitude 8140/SalvageSolitude8140v0.6 - Linux/SalvageSolitude8140v0.6.x86_64
StartupNotify=false
StartupWMClass=SalvageSolitude8140v0.6.x86_64
OnlyShowIn=Unity;
X-UnityGenerated=true

The spaces should be escaped or the locked app will disappear on the subsequent session

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.