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

git pushed a commit to branch master
in repository efm2.

View the commit online.

commit 3561378536c5a71c20fceb62d4e4d923bd6c0ccb
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Thu May 14 11:48:13 2026 +0100

    stash - record a nonexistent dir still as something
    
    this ways stash will report false as it didnt even find the parent dir
    thus no files can exist in it at the time. speeds up initial listing
    before .efm dir exists too.
---
 src/backends/default/stash.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/backends/default/stash.c b/src/backends/default/stash.c
index 063c2d4..1f17314 100644
--- a/src/backends/default/stash.c
+++ b/src/backends/default/stash.c
@@ -40,7 +40,6 @@ stash_dir_add(const char *dir)
   Stash *stash;
 
   it = eina_file_direct_ls(dir);
-  if (!it) return;
   stash = eina_hash_find(_stash_dirs, dir);
   if (!stash)
     { // doesn't exist yet - create it
@@ -81,15 +80,18 @@ stash_dir_add(const char *dir)
           goto done;
         }
     }
-  EINA_ITERATOR_FOREACH(it, info)
-  { // walk over dir and add entries per file found
-    const char *file = info->path + info->name_start;
+  if (it)
+    {
+      EINA_ITERATOR_FOREACH(it, info)
+      { // walk over dir and add entries per file found
+        const char *file = info->path + info->name_start;
 
-    // just flag the file as existing with a ptr of the stash itself
-    eina_hash_add(stash->files, file, stash);
-  }
-  done:
-  eina_iterator_free(it);
+        // just flag the file as existing with a ptr of the stash itself
+        eina_hash_add(stash->files, file, stash);
+      }
+    }
+done:
+  if (it) eina_iterator_free(it);
 }
 
 void

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

Reply via email to