[tracker] partial revert of 18b10a365e0fa736590dca83fccf4895ae7c8af5



commit d760406b6d67cb11696ae2f78c76d9e39e768619
Author: Saleem Abdulrasool <compnerd compnerd org>
Date:   Tue Mar 30 09:48:28 2010 -0700

    partial revert of 18b10a365e0fa736590dca83fccf4895ae7c8af5
    
    This prevents an extra stat call that should be unnecessary as
    g_key_file_load_from_file will check for us.  In case of an error, the error is
    just propagated and handled at the appropriate level.

 .../tracker-password-provider-keyfile.c            |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-password-provider-keyfile.c b/src/libtracker-miner/tracker-password-provider-keyfile.c
index 8162b46..a264a78 100644
--- a/src/libtracker-miner/tracker-password-provider-keyfile.c
+++ b/src/libtracker-miner/tracker-password-provider-keyfile.c
@@ -22,7 +22,6 @@
 #include <sys/mman.h>
 
 #include <glib-object.h>
-#include <gio/gio.h>
 
 #include "tracker-password-provider.h"
 
@@ -362,12 +361,10 @@ load_password_file (TrackerPasswordProviderKeyfile  *kf,
 
 	priv = TRACKER_PASSWORD_PROVIDER_KEYFILE_GET_PRIVATE (kf);
 
-	if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
-		g_key_file_load_from_file (priv->password_file,
-		                           filename,
-		                           G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
-		                           error);
-	}
+	g_key_file_load_from_file (priv->password_file,
+	                           filename,
+	                           G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
+	                           error);
 
 	g_free (filename);
 }



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