This commit is contained in:
2026-10-09 12:03:25 +06:30
parent 016dad446f
commit fa8691c04e
2 changed files with 2 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ func connect(printer string) (io.ReadWriteCloser, error) {
return conn, nil
} else if strings.HasPrefix(printer, "usb:") {
location := strings.TrimLeft(printer, "usb:")
f, err := os.OpenFile(location, os.O_RDWR, os.ModeDevice)
f, err := os.OpenFile(location, os.O_WRONLY, 0666)
if err != nil {
log.Println("error os.OpenFile usb:", err.Error())
return nil, err