[gnome-boxes] Remove _dir part from Util::get*unattended_dir



commit 3e0c3f5460b5bb64abad2fd65c73eb87cac10a95
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Wed May 23 18:33:44 2012 +0200

    Remove _dir part from Util::get*unattended_dir
    
    The other similar functions don't have _dir in their name, and this
    helper returns the path to a filename in the unattended directory,
    not a directory name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676658

 src/fedora-installer.vala     |    8 ++++----
 src/unattended-installer.vala |    4 ++--
 src/util.vala                 |    4 ++--
 src/win7-installer.vala       |    2 +-
 src/winxp-installer.vala      |    6 +++---
 5 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/fedora-installer.vala b/src/fedora-installer.vala
index e088fdc..952f389 100644
--- a/src/fedora-installer.vala
+++ b/src/fedora-installer.vala
@@ -30,7 +30,7 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
     }
 
     public FedoraInstaller.copy (InstallerMedia media) throws GLib.Error {
-        var source_path = get_unattended_dir ("fedora.ks");
+        var source_path = get_unattended ("fedora.ks");
 
         base.copy (media, source_path, "ks.cfg");
         password_mandatory = true;
@@ -123,7 +123,7 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
             return;
         }
 
-        mount_point = get_user_unattended_dir (os.short_id);
+        mount_point = get_user_unattended (os.short_id);
         var dir = File.new_for_path (mount_point);
         try {
             dir.make_directory (null);
@@ -147,9 +147,9 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
         if (!mounted)
             return;
 
-        kernel_path = get_user_unattended_dir (os.short_id + "-kernel");
+        kernel_path = get_user_unattended (os.short_id + "-kernel");
         kernel_file = yield copy_file (kernel_file, kernel_path, cancellable);
-        initrd_path = get_user_unattended_dir (os.short_id + "-initrd");
+        initrd_path = get_user_unattended (os.short_id + "-initrd");
         initrd_file = yield copy_file (initrd_file, initrd_path, cancellable);
     }
 
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index dfa5513..57a761b 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -259,7 +259,7 @@ private abstract class Boxes.UnattendedInstaller: InstallerMedia {
 
     private async void create_disk_image (Cancellable? cancellable) throws GLib.Error {
         var disk_file = File.new_for_path (disk_path);
-        var template_path = get_unattended_dir ("disk.img");
+        var template_path = get_unattended ("disk.img");
         var template_file = File.new_for_path (template_path);
 
         debug ("Creating disk image for unattended installation at '%s'..", disk_path);
@@ -332,7 +332,7 @@ private class Boxes.UnattendedFile {
 
     private async File create (Cancellable? cancellable)  throws GLib.Error {
         var source = File.new_for_path (src_path);
-        var destination_path = get_user_unattended_dir (dest_name);
+        var destination_path = get_user_unattended (dest_name);
         var destination = File.new_for_path (destination_path);
 
         debug ("Creating unattended file at '%s'..", destination.get_path ());
diff --git a/src/util.vala b/src/util.vala
index e9d4bd6..88ae9ae 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -26,7 +26,7 @@ namespace Boxes {
         return Path.build_filename (get_pkgdata (), "pixmaps", file_name);
     }
 
-    public string get_unattended_dir (string? file_name = null) {
+    public string get_unattended (string? file_name = null) {
         var dir = Path.build_filename (get_pkgdata (), "unattended");
 
         return Path.build_filename (dir, file_name);
@@ -36,7 +36,7 @@ namespace Boxes {
         return Path.build_filename (get_pkgdata (), "sources", file_name);
     }
 
-    public string get_user_unattended_dir (string? file_name = null) {
+    public string get_user_unattended (string? file_name = null) {
         var dir = Path.build_filename (get_user_pkgconfig (), "unattended");
 
         ensure_directory (dir);
diff --git a/src/win7-installer.vala b/src/win7-installer.vala
index b40c2f2..aa79619 100644
--- a/src/win7-installer.vala
+++ b/src/win7-installer.vala
@@ -32,7 +32,7 @@ private class Boxes.Win7Installer: WindowsInstaller {
     }
 
     public Win7Installer.copy (InstallerMedia media) throws GLib.Error {
-        var unattended_source = get_unattended_dir (media.os.short_id + ".xml");
+        var unattended_source = get_unattended (media.os.short_id + ".xml");
         base.copy (media, unattended_source, "Autounattend.xml");
 
         newline_type = DataStreamNewlineType.CR_LF;
diff --git a/src/winxp-installer.vala b/src/winxp-installer.vala
index 554b2d3..a71a374 100644
--- a/src/winxp-installer.vala
+++ b/src/winxp-installer.vala
@@ -20,15 +20,15 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
     }
 
     public WinXPInstaller.copy (InstallerMedia media) throws GLib.Error {
-        var unattended_source = get_unattended_dir (media.os.short_id + ".sif");
+        var unattended_source = get_unattended (media.os.short_id + ".sif");
         base.copy (media, unattended_source, "Winnt.sif");
 
         var name = media.os.short_id + ".cmd";
-        unattended_source = get_unattended_dir (name);
+        unattended_source = get_unattended (name);
         add_unattended_file (unattended_source, name);
 
         name = media.os.short_id + ".reg";
-        unattended_source = get_unattended_dir (name);
+        unattended_source = get_unattended (name);
         add_unattended_file (unattended_source, name);
 
         newline_type = DataStreamNewlineType.CR_LF;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]