added... closing an open file. fucking retard mistake

This commit is contained in:
Jacob 2017-11-30 12:20:32 +01:00
parent 5aebb3a5a2
commit 6d83827bc3

View File

@ -52,18 +52,22 @@ func verifyFolderModification() bool {
f, err := os.Open("./posts")
if err != nil {
fmt.Println("file-error here: \n", f)
f.Close()
return false
}
info, err := f.Stat()
if err != nil {
fmt.Println("info here: \n", info)
f.Close()
return false
}
_modTime := info.ModTime()
if modTime != _modTime {
modTime = _modTime
f.Close()
return true
}
f.Close()
return false
}