From 0d0f1f6d38e8d2ff79c9bbe76273e8c6b331258d Mon Sep 17 00:00:00 2001 From: simulot Date: Sun, 17 Nov 2024 10:29:17 +0100 Subject: [PATCH] fix Upload Error - Invalid Argument - 0.23.0-alpha5 - Windows #534 --- adapters/folder/readFolder.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/adapters/folder/readFolder.go b/adapters/folder/readFolder.go index f66ff9a..718aa0a 100644 --- a/adapters/folder/readFolder.go +++ b/adapters/folder/readFolder.go @@ -4,6 +4,7 @@ import ( "context" "errors" "io/fs" + "path" "path/filepath" "sort" "strings" @@ -88,6 +89,7 @@ func (la *LocalAssetBrowser) concurrentParseDir(ctx context.Context, fsys fs.FS, defer la.wg.Done() err := la.parseDir(ctx, fsys, dir, gOut) if err != nil { + la.log.Log().Error(err.Error()) cancel(err) } }) @@ -115,7 +117,7 @@ func (la *LocalAssetBrowser) parseDir(ctx context.Context, fsys fs.FS, dir strin for _, entry := range entries { base := entry.Name() - name := filepath.Join(dir, base) + name := path.Join(dir, base) if entry.IsDir() { continue } @@ -176,7 +178,7 @@ func (la *LocalAssetBrowser) parseDir(ctx context.Context, fsys fs.FS, dir strin // process the left over dirs for _, entry := range entries { base := entry.Name() - name := filepath.Join(dir, base) + name := path.Join(dir, base) if entry.IsDir() { if la.flags.BannedFiles.Match(name) { la.log.Record(ctx, fileevent.DiscoveredDiscarded, fshelper.FSName(fsys, name), "reason", "banned folder")