From fa5460a18752e18c87d5eafb54088b7a04792db6 Mon Sep 17 00:00:00 2001 From: comp500 Date: Fri, 24 Mar 2023 01:31:10 +0000 Subject: [PATCH] Normalise paths to ensure they are compared properly --- core/index.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/index.go b/core/index.go index 59ab917..5e5c967 100644 --- a/core/index.go +++ b/core/index.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "os" + "path" "path/filepath" "sort" "strings" @@ -261,6 +262,11 @@ func (in *Index) Refresh() error { ), ) + // Normalise file paths: updateFile needs to compare path equality + for i := range in.Files { + in.Files[i].File = path.Clean(in.Files[i].File) + } + for _, v := range fileList { start := time.Now()