Correct ioutil.WriteFile comment about os.Create (#4864)

Correct incorrect comment introduced in #2660
This commit is contained in:
Josh Soref
2021-07-01 04:42:25 -04:00
committed by GitHub
parent f6714b031f
commit f4c4865a3a

View File

@@ -294,7 +294,8 @@ func write(filePath string, fi *FileIndex) error {
if err != nil {
return err
}
// 0600 is the mask used when a file is created using os.Create hence defaulting
// While 0666 is the mask used when a file is created using os.Create,
// gosec objects, so use 0600 instead
return ioutil.WriteFile(filePath, jsonData, 0600)
}