diff --git a/main.go b/main.go index 5cf6cf9..56fb191 100644 --- a/main.go +++ b/main.go @@ -26,6 +26,11 @@ func main() { if *file != "" { log.Printf("Attempting to print file %s...\n", *file) + if !isPossibleToPrint(*file) { + log.Fatalln("Cannot print, this is not a photo (.jpg/.png only!)") + os.Exit(1) + } + *dir = filepath.Join(os.TempDir(), "phomemo") os.Mkdir(*dir, os.ModePerm) // ignore error in case still existing err := copyFileToFolder(*file, *dir)