Commit bd5780ab authored by suyanlong's avatar suyanlong

Fixed Exist function

parent dc9b6472
...@@ -29,11 +29,7 @@ func Asset(err error) { ...@@ -29,11 +29,7 @@ func Asset(err error) {
// Exist check if the file with the given path exits. // Exist check if the file with the given path exits.
func Exist(path string) bool { func Exist(path string) bool {
fi, err := os.Lstat(path) fi, err := os.Lstat(path)
if fi != nil || (err != nil && !os.IsNotExist(err)) { return fi != nil || (err != nil && !os.IsNotExist(err))
return true
}
return false
} }
// https://github.com/fatih/gomodifytags // https://github.com/fatih/gomodifytags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment