mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
Fix FileExist() error handling
This commit is contained in:
parent
0bfe683108
commit
93efaa5459
@ -24,7 +24,10 @@ import (
|
||||
)
|
||||
|
||||
func FileExist(path string) bool {
|
||||
if _, err := os.Stat(path); os.IsNotExist(err) {
|
||||
_, err := os.Stat(path)
|
||||
if os.IsNotExist(err) {
|
||||
return false
|
||||
} else if err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user