[gnome-boxes] installer: Add try to delete inexistant file
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] installer: Add try to delete inexistant file
- Date: Fri, 7 Dec 2012 19:48:41 +0000 (UTC)
commit 4bca0198f0ba4d8bf7a8d1d051b69d415ece3e7a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Dec 5 17:49:24 2012 +0200
installer: Add try to delete inexistant file
Don't try to delete the temporary file if it wasn't created.
https://bugzilla.gnome.org/show_bug.cgi?id=676537
src/unattended-installer.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index d1f2da6..8b260b0 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -688,6 +688,9 @@ private class Boxes.UnattendedTextFile : GLib.Object, Boxes.UnattendedFile {
}
~UnattendedTextFile () {
+ if (unattended_tmp == null)
+ return;
+
try {
delete_file (unattended_tmp);
} catch (GLib.Error e) {
@@ -746,6 +749,9 @@ private class Boxes.UnattendedAvatarFile : GLib.Object, Boxes.UnattendedFile {
}
~UnattendedAvatarFile () {
+ if (unattended_tmp == null)
+ return;
+
try {
delete_file (unattended_tmp);
} catch (GLib.Error e) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]