[PATCH] fix: list partially corrupted folder

Jean-Tiare Le Bigot jt at yadutaf.fr
Sun Aug 30 18:44:23 CEST 2015


---
 thunar/thunar-io-jobs.c           |  2 +-
 thunar/thunar-io-scan-directory.c | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/thunar/thunar-io-jobs.c b/thunar/thunar-io-jobs.c
index 9d904f9..00d6a49 100644
--- a/thunar/thunar-io-jobs.c
+++ b/thunar/thunar-io-jobs.c
@@ -1197,7 +1197,7 @@ _thunar_io_jobs_ls (ThunarJob  *job,
   if (err != NULL)
     {
       g_propagate_error (error, err);
-      return FALSE;
+      g_clear_error(&err);
     }
   else if (exo_job_set_error_if_cancelled (EXO_JOB (job), &err))
     {
diff --git a/thunar/thunar-io-scan-directory.c b/thunar/thunar-io-scan-directory.c
index 66ddbdf..269a440 100644
--- a/thunar/thunar-io-scan-directory.c
+++ b/thunar/thunar-io-scan-directory.c
@@ -112,7 +112,17 @@ thunar_io_scan_directory (ThunarJob          *job,
                                           &err);
 
       if (G_UNLIKELY (info == NULL))
-        break;
+        {
+          /* silently ignore broken file entries */
+          if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_FAILED))
+            {
+              g_propagate_error (error, err);
+              g_clear_error (&err);
+              continue;
+            }
+          break;
+        }
+
 
       is_mounted = TRUE;
       if (err != NULL)
-- 
2.1.4



More information about the Xfce4-dev mailing list