diff --git a/utils/files.go b/utils/files.go index decd66c..32a7f01 100644 --- a/utils/files.go +++ b/utils/files.go @@ -7,11 +7,7 @@ import ( ) func WriteFile(destinationPath string, tempPath string, dataForDisk []byte) { - existingStat, err := os.Lstat(destinationPath) - if err != nil { - log.Fatalf("Error checking if file exists : %s", err) - } - if err := ioutil.WriteFile(tempPath, dataForDisk, existingStat.Mode()); err != nil { + if err := ioutil.WriteFile(tempPath, dataForDisk, 0644); err != nil { log.Fatalf("Error writing temp file : %s", err) } if err := os.Rename(tempPath, destinationPath); err != nil {