mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-04 18:49:45 +00:00
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()) {
|
if (out.is_open()) {
|
||||||
out.close();
|
out.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!filename.empty()) {
|
||||||
error_code error;
|
error_code error;
|
||||||
remove(path(filename), error);
|
remove(path(filename), error);
|
||||||
|
|
||||||
@ -136,6 +138,8 @@ void SCSIPrinter::SynchronizeBuffer()
|
|||||||
throw scsi_exception(sense_key::aborted_command);
|
throw scsi_exception(sense_key::aborted_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.close();
|
||||||
|
|
||||||
string cmd = GetParam("cmd");
|
string cmd = GetParam("cmd");
|
||||||
const size_t file_position = cmd.find("%f");
|
const size_t file_position = cmd.find("%f");
|
||||||
assert(file_position != string::npos);
|
assert(file_position != string::npos);
|
||||||
|
Loading…
Reference in New Issue
Block a user