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 4745cf3 commit 7f29071
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 @@ -5,6 +5,7 @@ import (
"context"
"errors"
"io/fs"
"path"
"path/filepath"
"sort"
"strings"
Expand Down Expand Up @@ -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)
}
})
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 7f29071

Please sign in to comment.