pixma: get device id if we replay a xml file

merge-requests/213/head^2
Rolf Bensch 2020-03-31 13:26:38 +02:00
rodzic fa9d240e70
commit d2a43afce0
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -1626,7 +1626,11 @@ sane_open (SANE_String_Const name, SANE_Handle * h)
nscanners = pixma_find_scanners (conf_devices, SANE_FALSE);
if (nscanners == 0)
return SANE_STATUS_INVAL;
if (name[0] == '\0')
/* also get device id if we replay a xml file
* otherwise name contains the xml filename
* and further replay will fail */
if (name[0] == '\0' || strstr (name, ".xml"))
name = pixma_get_device_id (0);
/* Have we already opened the scanner? */