mirror of https://github.com/akuker/RASCSI.git
Properly close file to be printed (#1428)
This commit is contained in:
parent
274b93fe27
commit
4ae03e2ec7
|
@ -79,7 +79,9 @@ void SCSIPrinter::CleanUp()
|
|||
|
||||
if (out.is_open()) {
|
||||
out.close();
|
||||
}
|
||||
|
||||
if (!filename.empty()) {
|
||||
error_code error;
|
||||
remove(path(filename), error);
|
||||
|
||||
|
@ -136,6 +138,8 @@ void SCSIPrinter::SynchronizeBuffer()
|
|||
throw scsi_exception(sense_key::aborted_command);
|
||||
}
|
||||
|
||||
out.close();
|
||||
|
||||
string cmd = GetParam("cmd");
|
||||
const size_t file_position = cmd.find("%f");
|
||||
assert(file_position != string::npos);
|
||||
|
|
Loading…
Reference in New Issue