Skip to content

Commit

Permalink
Fix abs path bug
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Petkovski <[email protected]>
  • Loading branch information
fpetkovski committed Oct 29, 2024
1 parent 6aa1b9b commit 1c966da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions providers/filesystem/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (b *Bucket) Iter(ctx context.Context, dir string, f func(name string, attrs
return err
}
for _, file := range files {
name := filepath.Join(absDir, file.Name())
name := filepath.Join(dir, file.Name())

if file.IsDir() {
empty, err := isDirEmpty(filepath.Join(absDir, file.Name()))
Expand Down Expand Up @@ -104,7 +104,8 @@ func (b *Bucket) Iter(ctx context.Context, dir string, f func(name string, attrs

attrs := objstore.EmptyObjectAttributes
if params.WithUpdatedAt {
stat, err := os.Stat(name)
absPath := filepath.Join(absDir, name)
stat, err := os.Stat(absPath)
if err != nil {
return errors.Wrapf(err, "unable stat %s", name)
}
Expand Down

0 comments on commit 1c966da

Please sign in to comment.