Only print .jpg/.png even with -file cmdarg

main
Wouter Groeneveld 3 months ago
parent 6241c45c87
commit 8730d2c29f

@ -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)

Loading…
Cancel
Save