mirror of
https://github.com/boxgaming/qbjs.git
synced 2024-09-20 04:24:45 +00:00
Allows CLOSE to be called without parameters
CLOSE should invalidate all open handles when called with no parameters;
This commit is contained in:
parent
97406a891d
commit
1f20565471
1 changed files with 6 additions and 0 deletions
6
qb.js
6
qb.js
|
@ -1064,6 +1064,12 @@ var QB = new function() {
|
|||
};
|
||||
|
||||
this.sub_Close = function(fh) {
|
||||
if (!fh) {
|
||||
for (const key in _fileHandles) {
|
||||
delete _fileHandles[key];
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!_fileHandles[fh]) {
|
||||
throw new Error("Invalid file handle");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue