[gvfs] Handle error case in cache lookup correctly
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] Handle error case in cache lookup correctly
- Date: Tue, 1 Dec 2009 10:29:32 +0000 (UTC)
commit a17a5d9e3a13c0bf516a0955e79a1620efa00c6d
Author: Alexander Larsson <alexl redhat com>
Date: Tue Dec 1 11:15:47 2009 +0100
Handle error case in cache lookup correctly
If we're in error, we should return NULL, not an uninitialized info.
daemon/gvfsftpdircache.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsftpdircache.c b/daemon/gvfsftpdircache.c
index e357edd..dffebbc 100644
--- a/daemon/gvfsftpdircache.c
+++ b/daemon/gvfsftpdircache.c
@@ -216,10 +216,10 @@ g_vfs_ftp_dir_cache_lookup_file_internal (GVfsFtpDirCache * cache,
g_vfs_ftp_dir_cache_entry_unref (entry);
}
- if (!g_vfs_ftp_task_is_in_error (task))
- info = cache->funcs->lookup_uncached (task, file);
+ if (g_vfs_ftp_task_is_in_error (task))
+ return NULL;
- return info;
+ return cache->funcs->lookup_uncached (task, file);
}
static GFileInfo *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]