fix filetype extension check
This commit is contained in:
5
main.go
5
main.go
@@ -49,8 +49,11 @@ func isImage(entry os.DirEntry) bool {
|
||||
return false
|
||||
}
|
||||
ext := filepath.Ext(entry.Name())
|
||||
if ext == "" {
|
||||
return false
|
||||
}
|
||||
for _, ft := range validFileTypes {
|
||||
if slices.Contains(ft.TkType.Extensions, ext) {
|
||||
if slices.Contains(ft.MacExtensions, ext[1:]) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user