From 2ec0c457cf11b6cb87aebe7993cd77ce34dfd427 Mon Sep 17 00:00:00 2001 From: Graham Steffaniak <42989099+gtsteffaniak@users.noreply.github.com> Date: Mon, 16 Sep 2024 20:30:55 -0500 Subject: [PATCH] hotfix: adjusted paths (#211) --- backend/files/indexing.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/files/indexing.go b/backend/files/indexing.go index 84aced45..b6a1cc7e 100644 --- a/backend/files/indexing.go +++ b/backend/files/indexing.go @@ -82,7 +82,7 @@ func indexingScheduler(intervalMinutes uint32) { // Define a function to recursively index files and directories func (si *Index) indexFiles(path string) error { // Check if the current directory has been modified since the last indexing - adjustedPath := si.makeIndexPath(path, false) + adjustedPath := si.makeIndexPath(path, true) dir, err := os.Open(path) if err != nil { // Directory must have been deleted, remove it from the index @@ -133,7 +133,7 @@ func (si *Index) InsertFiles(path string) { func (si *Index) InsertDirs(path string) { for _, f := range si.GetQuickList() { if f.IsDir { - adjustedPath := si.makeIndexPath(path, false) + adjustedPath := si.makeIndexPath(path, true) if _, exists := si.Directories[adjustedPath]; exists { si.UpdateCount("dirs") // Add or update the directory in the map