Skip to content

Commit

Permalink
fix(local): files get deleted when copied to other storage (close #4983)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 10, 2023
1 parent df6b306 commit c59dbb4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/local/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"errors"
"fmt"
"io"
"io/fs"
"net/http"
"os"
Expand Down Expand Up @@ -180,7 +181,15 @@ func (d *Local) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (
if err != nil {
return nil, err
}
link.ReadSeekCloser = open
link.ReadSeekCloser = struct {
io.Reader
io.Seeker
io.Closer
}{
Reader: open,
Seeker: open,
Closer: open,
}
}
return &link, nil
}
Expand Down

0 comments on commit c59dbb4

Please sign in to comment.