mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-12 07:34:41 +02:00
Fix deprecated write() without callback for Node.js 10.x+
This commit is contained in:
parent
75c952c976
commit
8942eff203
1 changed files with 7 additions and 3 deletions
|
@ -314,9 +314,13 @@ exports.getModule = class TransferFileModule extends MenuModule {
|
||||||
return callback(err); // failed to create it
|
return callback(err); // failed to create it
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.write(tempFileInfo.fd, filePaths.join(SYSTEM_EOL));
|
fs.write(tempFileInfo.fd, filePaths.join(SYSTEM_EOL), err => {
|
||||||
fs.close(tempFileInfo.fd, err => {
|
if(err) {
|
||||||
return callback(err, tempFileInfo.path);
|
return callback(err);
|
||||||
|
}
|
||||||
|
fs.close(tempFileInfo.fd, err => {
|
||||||
|
return callback(err, tempFileInfo.path);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue