mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
parent
d9da7f3cd3
commit
523294e6d1
@ -55,7 +55,7 @@ func FileCount(dir string) int64 {
|
|||||||
|
|
||||||
func ImageExists(filename string) bool {
|
func ImageExists(filename string) bool {
|
||||||
info, err := os.Stat(filename)
|
info, err := os.Stat(filename)
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) || err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// if file size is less than 100 bytes, we assume it's invalid file
|
// if file size is less than 100 bytes, we assume it's invalid file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user