Skip to content

Commit dd2b7bd

Browse files
committed
Add error message when removing local file
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent 048c9f8 commit dd2b7bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/fs/local.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package fs
22

33
import (
44
"context"
5+
"fmt"
56
"io"
67
"net/http"
78
"os"
@@ -37,7 +38,7 @@ func (l *Local) Open(name string) (http.File, error) {
3738
func (l *Local) Delete(_ctx context.Context, name string) error {
3839
path := filepath.Join(l.rootDir, name)
3940
if err := os.Remove(path); err != nil {
40-
return err
41+
return fmt.Errorf("failed to delete file %s: %w", path, err)
4142
}
4243
return nil
4344
}

0 commit comments

Comments
 (0)