Fix symlink size calculation (#3046)

This commit is contained in:
WithoutPants
2022-10-25 10:57:37 +11:00
committed by GitHub
parent 5fae3cf127
commit 1c92336798
3 changed files with 25 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ func (o *fsOpener) Open() (io.ReadCloser, error) {
// FS represents a file system.
type FS interface {
Stat(name string) (fs.FileInfo, error)
Lstat(name string) (fs.FileInfo, error)
Open(name string) (fs.ReadDirFile, error)
OpenZip(name string) (*ZipFS, error)
@@ -30,6 +31,10 @@ type FS interface {
// OsFS is a file system backed by the OS.
type OsFS struct{}
func (f *OsFS) Stat(name string) (fs.FileInfo, error) {
return os.Stat(name)
}
func (f *OsFS) Lstat(name string) (fs.FileInfo, error) {
return os.Lstat(name)
}