After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689840 - InstallerMedia.get_device_from_path issue
InstallerMedia.get_device_from_path issue
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-12-07 12:08 UTC by Alexander Larsson
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove wrong usage of GLib.File.new_for_commandline_arg (1.68 KB, patch)
2013-04-09 20:13 UTC, Zeeshan Ali
committed Details | Review

Description Alexander Larsson 2012-12-07 12:08:22 UTC
InstallerMedia.get_device_from_path uses File.new_for_commandline_arg (path), which is not the right way for anything other than command line arguments. 
Its argument assumed to be in the filename encoding and fully shell expanded. Anything comming from a ui is more likely UTF8 and needs conversion via, g_file_parse_name(), or is a real pathname that needs no special handling and should use new_for_path().
Comment 1 Zeeshan Ali 2013-04-09 20:13:14 UTC
Created attachment 241086 [details] [review]
Remove wrong usage of GLib.File.new_for_commandline_arg

Use GLib.File.new_for_path/uri instead as path/URI is not coming from
commandline argument.
Comment 2 Zeeshan Ali 2013-04-10 15:27:50 UTC
Attachment 241086 [details] pushed as 3c1b44c - Remove wrong usage of GLib.File.new_for_commandline_arg