diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2021-09-10 13:09:50 +0300 |
---|---|---|
committer | Vladimir Shushlin <vshushlin@gitlab.com> | 2021-09-10 13:09:50 +0300 |
commit | b3b02904e20e574634bb8b464ddf2173deea6113 (patch) | |
tree | 57eba1f88632702c7c0d4b865a2cc82a6b73920d | |
parent | 6b9b03db88911c9939d5fc1d92d4b15912cc7665 (diff) | |
parent | 25baca65a0f1f33c260d92438cd9af547b8b84ce (diff) |
Merge branch 'fix-darwin-httptransport' into 'master'
fix: darwin transport after ioutil replacement
See merge request gitlab-org/gitlab-pages!574
-rw-r--r-- | internal/httptransport/transport_darwin.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/httptransport/transport_darwin.go b/internal/httptransport/transport_darwin.go index 43c0b830..435b7a2b 100644 --- a/internal/httptransport/transport_darwin.go +++ b/internal/httptransport/transport_darwin.go @@ -98,7 +98,7 @@ func readUniqueDirectoryEntries(dir string) ([]os.DirEntry, error) { return nil, err } uniq := des[:0] - for _, de := range fis { + for _, de := range des { if !isSameDirSymlink(de, dir) { uniq = append(uniq, de) } @@ -109,7 +109,7 @@ func readUniqueDirectoryEntries(dir string) ([]os.DirEntry, error) { // isSameDirSymlink reports whether fi in dir is a symlink with a // target not containing a slash. func isSameDirSymlink(de os.DirEntry, dir string) bool { - if de.Mode()&os.ModeSymlink == 0 { + if de.Type()&os.ModeSymlink == 0 { return false } target, err := os.Readlink(filepath.Join(dir, de.Name())) |