Skip to content

Commit

Permalink
fix Upload Error - Invalid Argument - 0.23.0-alpha5 - Windows #534
Browse files Browse the repository at this point in the history
  • Loading branch information
simulot committed Nov 17, 2024
1 parent 3306536 commit 0d0f1f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adapters/folder/readFolder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"io/fs"
"path"
"path/filepath"
"sort"
"strings"
Expand Down Expand Up @@ -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)
}
})
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 0d0f1f6

Please sign in to comment.