forked from ohayo-jacob/takunomi-blog
added... closing an open file. fucking retard mistake
This commit is contained in:
parent
5aebb3a5a2
commit
6d83827bc3
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user