qzind / tray

Browser plugin for sending documents and raw commands to a printer or attached device.
https://qz.io
Other
824 stars 266 forks source link

printers.putAll(...) clears NativePrinterMap #1189

Closed tresf closed 9 months ago

tresf commented 9 months ago

As identified in #1124 by @Vzor-, printers.putAll(...) will wipe out all entries of NativePrinterMap.

https://github.com/qzind/tray/blob/402f9243b256b9c30e8206c1e8e18bce1ff809bf/src/qz/printer/PrintServiceMatcher.java#L54-L57

This is because NativePrinterMap.findMissing(...) performs a destructive operation:

https://github.com/qzind/tray/blob/402f9243b256b9c30e8206c1e8e18bce1ff809bf/src/qz/printer/info/NativePrinterMap.java#L46-L64

tresf commented 9 months ago

This will be fixed by #1124, specifically https://github.com/qzind/tray/pull/1124/commits/a8beeba614f2ae66f8f64acd072b4dfc9b0b96c6.