[gnome-boxes] Remove wrong usage of GLib.File.new_for_commandline_arg
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Remove wrong usage of GLib.File.new_for_commandline_arg
- Date: Wed, 10 Apr 2013 15:27:41 +0000 (UTC)
commit 3c1b44c02b7b8a7935dd492dcfd9b1cbe386a9a6
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Apr 9 23:10:54 2013 +0300
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.
https://bugzilla.gnome.org/show_bug.cgi?id=689840
src/installer-media.vala | 2 +-
src/wizard.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index 471e87f..f94feee 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -129,7 +129,7 @@ private class Boxes.InstallerMedia : GLib.Object {
private async GUdev.Device? get_device_from_path (string path, Client client, Cancellable? cancellable) {
try {
- var mount_dir = File.new_for_commandline_arg (path);
+ var mount_dir = File.new_for_path (path);
var mount = yield mount_dir.find_enclosing_mount_async (Priority.DEFAULT, cancellable);
var root_dir = mount.get_root ();
if (root_dir.get_path () == mount_dir.get_path ()) {
diff --git a/src/wizard.vala b/src/wizard.vala
index b5c405f..2bd6f27 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -225,7 +225,7 @@ private class Boxes.Wizard: Boxes.UI {
if (location == "")
throw new Boxes.Error.INVALID ("empty location");
- var file = File.new_for_commandline_arg (location);
+ var file = File.new_for_uri (location);
if (file.is_native ()) {
// FIXME: We should able to handle non-local URIs here too
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]