[dconf] dconf update: Fix error code EEXIST -> ENOENT



commit aae1e9a6a60b2174b862a96f223cce358e3cb87c
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Dec 18 10:59:16 2010 -0500

    dconf update: Fix error code EEXIST -> ENOENT
    
    I meant to check for the file not existing, which is ENOENT.

 bin/dconf-update.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/bin/dconf-update.vala b/bin/dconf-update.vala
index 5171192..193f7d9 100644
--- a/bin/dconf-update.vala
+++ b/bin/dconf-update.vala
@@ -34,7 +34,7 @@ unowned Gvdb.Item get_parent (Gvdb.HashTable table, string name) {
 	parent = table.lookup (parent_name);
 
 	if (parent == null) {
-		parent = table.insert (parent_name);
+		paren = table.insert (parent_name);
 		parent.set_parent (get_parent (table, parent_name));
 	}
 
@@ -114,7 +114,7 @@ void maybe_update_from_directory (string dirname) throws GLib.Error {
 
 		var fd = Posix.open (filename, Posix.O_WRONLY);
 
-		if (fd < 0 && errno != Posix.EEXIST) {
+		if (fd < 0 && errno != Posix.ENOENT) {
 			var saved_error = errno;
 			throw new FileError.FAILED ("Can not open '%s' for replacement: %s", filename, strerror (saved_error));
 		}



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