Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
SusanDoggie committed Sep 13, 2018
1 parent 8c0b8de commit 39b3c84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/CUPS/CUPSPrinter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ extension CUPSPrinter {
Clean \(colorname)
"""

let doc = CUPSDocument(name: "command", format: "application/vnd.cups-command", data: command.data(using: .utf8)!)
let doc = CUPSDocument(name: "clean \(colorname)", format: "application/vnd.cups-command", data: command.data(using: .utf8)!)

return self.send(title: "Clean \(colorname)", [doc])
}
Expand Down Expand Up @@ -337,9 +337,9 @@ extension CUPSPrinter {

do {

let list = try files.map { try Data(contentsOf: URL(fileURLWithPath: $0)) }
let list = try files.map { URL(fileURLWithPath: $0) }.map { ($0.lastPathComponent, try Data(contentsOf: $0)) }

let docs = list.enumerated().map { CUPSDocument(name: "\(title) \($0 + 1)", format: nil, data: $1) }
let docs = list.map { CUPSDocument(name: $0, format: nil, data: $1) }

return self.send(title: title, docs, options)

Expand Down

0 comments on commit 39b3c84

Please sign in to comment.