[Xfce4-commits] [xfce/thunar] 01/01: Refresh file info after getting it from cache (bug #11008)

noreply at xfce.org noreply at xfce.org
Thu Feb 19 11:08:07 CET 2015


This is an automated email from the git hooks/post-receive script.

hjudt pushed a commit to branch master
in repository xfce/thunar.

commit cc8d1331e305f2af5842607d885eb96608b8fce7
Author: Peter de Ridder <cavalier at the-cavalry.org>
Date:   Thu Feb 5 22:22:41 2015 +0100

    Refresh file info after getting it from cache (bug #11008)
---
 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
     {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list