Skip to content

Commit

Permalink
Update printer file handling
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Feb 2, 2024
1 parent 961a848 commit a6c9485
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/devices/printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ void Printer::CleanUp()

if (out.is_open()) {
out.close();
}

if (!filename.empty()) {
error_code error;
filesystem::remove(path(filename), error);

Expand Down Expand Up @@ -156,6 +158,8 @@ void Printer::SynchronizeBuffer()
throw scsi_exception(sense_key::aborted_command, asc::printer_nothing_to_print);
}

out.close();

string cmd = GetParam("cmd");
const size_t file_position = cmd.find("%f");
assert(file_position != string::npos);
Expand Down

0 comments on commit a6c9485

Please sign in to comment.