[gvfs] MTP: Clear previous cache entries when refreshing a directory.
- From: Philip Langdale <philipl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] MTP: Clear previous cache entries when refreshing a directory.
- Date: Sat, 30 Mar 2013 23:26:55 +0000 (UTC)
commit 12a47b298d3bb3274e9796533cdd6c88b670e87d
Author: Philip Langdale <philipl overt org>
Date: Sun Mar 17 15:58:21 2013 -0700
MTP: Clear previous cache entries when refreshing a directory.
https://bugzilla.gnome.org/show_bug.cgi?id=696016
daemon/gvfsbackendmtp.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 0841a5c..ba0f45c 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -1073,6 +1073,11 @@ do_enumerate (GVfsBackend *backend,
goto exit;
}
+ /* Invalidate existing cache entries in case any are stale. */
+ char *remove_prefix = g_strdup_printf("%s/", filename);
+ remove_cache_entry (G_VFS_BACKEND_MTP (backend), remove_prefix);
+ g_free (remove_prefix);
+
LIBMTP_file_t *files;
LIBMTP_Clear_Errorstack (device);
files = LIBMTP_Get_Files_And_Folders (device, entry->storage, entry->id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]