From 7f29071c3857bb651f0ed162b2973cd16b8da0d5 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 6455673..8d32dd5 100644 --- a/adapters/folder/readFolder.go +++ b/adapters/folder/readFolder.go @@ -5,6 +5,7 @@ import ( "context" "errors" "io/fs" + "path" "path/filepath" "sort" "strings" @@ -89,6 +90,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) } }) @@ -116,7 +118,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 } @@ -177,7 +179,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, fileevent.AsFileAndName(fsys, name), "reason", "banned folder")