Skip to content

Commit

Permalink
Switch from using io/fs to just using os which preserves Go 1.15 comp…
Browse files Browse the repository at this point in the history
…atibility

Signed-off-by: Daniel Mikusa <[email protected]>
  • Loading branch information
Daniel Mikusa committed Aug 20, 2021
1 parent 3f5b5f4 commit 6c1483e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sherpa/file_listing.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"encoding/hex"
"fmt"
"io"
"io/fs"
"os"
"path/filepath"
"sort"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6c1483e

Please sign in to comment.