From 5ac9b24cabd9f93074621018e82370f764b0e1d8 Mon Sep 17 00:00:00 2001 From: Peter de Ridder Date: Thu, 5 Feb 2015 22:22:41 +0100 Subject: [PATCH] Refresh file info after getting it from cache --- thunar/thunar-file.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 60fe3e7..f36ed26 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -1229,6 +1229,22 @@ thunar_file_get_with_info (GFile *gfile, { /* return the file, it already has an additional ref set * in thunar_file_cache_lookup */ + + /* The file might have changed while being cached. + * Use the info to update the file */ + + /* reset the file */ + thunar_file_info_clear (file); + + /* set the passed info */ + file->info = g_object_ref (info); + + /* update the file from the information */ + thunar_file_info_reload (file, NULL); + + /* update the mounted info */ + if (not_mounted) + FLAG_UNSET (file, THUNAR_FILE_FLAG_IS_MOUNTED); } else { -- 2.2.2