[gnome-boxes] installer: Don't try to copy non-existant avatar



commit 47d65b7e22ae3022dc04675710e0a979aad33eb1
Author: Timm Bäder <mail baedert org>
Date:   Sat Mar 15 20:36:45 2014 +0100

    installer: Don't try to copy non-existant avatar
    
    If the avatar file does not exist, we shouldn't later try to copy it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726432

 src/unattended-installer.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 7fe6f09..d80a232 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -399,6 +399,9 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
             warning ("Failed to retrieve information about user '%s': %s", username, error.message);
         }
 
+        if (!FileUtils.test (avatar_path, FileTest.EXISTS))
+            return;
+
         setup_box.avatar_path = avatar_path;
 
         try {


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