1
0
mirror of https://github.com/securego/gosec.git synced 2025-07-13 01:00:25 +02:00

Merge pull request #27 from cwkuo/fix-windows-file-contains

Fix os.IsExist() condition in filelist.Contains()
This commit is contained in:
Grant Murphy
2016-07-29 08:50:28 -07:00
committed by GitHub

View File

@ -59,7 +59,7 @@ func (f *filelist) Contains(pathname string) bool {
// Finally try absolute path
st, e := os.Stat(rel)
if !os.IsNotExist(e) && st.IsDir() && strings.HasPrefix(abs, rel) {
if os.IsExist(e) && st.IsDir() && strings.HasPrefix(abs, rel) {
return true
}