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")
|
f, err := os.Open("./posts")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("file-error here: \n", f)
|
fmt.Println("file-error here: \n", f)
|
||||||
|
f.Close()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
info, err := f.Stat()
|
info, err := f.Stat()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("info here: \n", info)
|
fmt.Println("info here: \n", info)
|
||||||
|
f.Close()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
_modTime := info.ModTime()
|
_modTime := info.ModTime()
|
||||||
if modTime != _modTime {
|
if modTime != _modTime {
|
||||||
modTime = _modTime
|
modTime = _modTime
|
||||||
|
f.Close()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
f.Close()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user