mirror of https://github.com/calzoneman/sync.git
Fix node deprecation warning about calling fs.writeFile without cb
This commit is contained in:
parent
8306d2d1b6
commit
25c663c110
|
@ -48,8 +48,12 @@ function getTorIPs(cb) {
|
|||
retrieveIPs(function (err, ips) {
|
||||
if (!err) {
|
||||
cb(false, ips);
|
||||
fs.writeFile(path.join(__dirname, "..", "torlist"),
|
||||
ips.join("\n"));
|
||||
const destination = path.join(__dirname, "..", "torlist");
|
||||
fs.writeFile(destination,
|
||||
ips.join("\n"),
|
||||
error => {
|
||||
LOGGER.error("Failed to write to %s: %s", destination, error.stack);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue