From 6c1483eec932a2c15115c294a49d3e6a0b70638d Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Fri, 20 Aug 2021 14:20:18 -0400 Subject: [PATCH] Switch from using io/fs to just using os which preserves Go 1.15 compatibility Signed-off-by: Daniel Mikusa --- sherpa/file_listing.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sherpa/file_listing.go b/sherpa/file_listing.go index 69b6890..4684505 100644 --- a/sherpa/file_listing.go +++ b/sherpa/file_listing.go @@ -21,7 +21,6 @@ import ( "encoding/hex" "fmt" "io" - "io/fs" "os" "path/filepath" "sort" @@ -162,8 +161,8 @@ func process(entry FileEntry) (FileEntry, error) { return entry, nil } -func isSymlinkToDir(symlink string, f fs.FileInfo) (bool, error) { - if f.Mode().Type() == fs.ModeSymlink { +func isSymlinkToDir(symlink string, f os.FileInfo) (bool, error) { + if f.Mode().Type() == os.ModeSymlink { path, err := os.Readlink(symlink) if err != nil { return false, fmt.Errorf("unable to read symlink %s\n%w", symlink, err)