Browse Source

removed console.log, added try/catch

master
mortie 7 years ago
parent
commit
f3c4e1bd99
2 changed files with 5 additions and 2 deletions
  1. 0
    1
      js/fsutil.js
  2. 5
    1
      js/play/index.js

+ 0
- 1
js/fsutil.js View File

* Remove directory, deleting its content in the process * Remove directory, deleting its content in the process
*/ */
exports.rmdir = function(dir) { exports.rmdir = function(dir) {
console.log("rmdir", dir);
try { try {
fs.accessSync(dir, fs.F_OK) fs.accessSync(dir, fs.F_OK)
} catch (err) { } catch (err) {

+ 5
- 1
js/play/index.js View File

httpStream.stop(); httpStream.stop();


exports.cleanupFiles.forEach(f => { exports.cleanupFiles.forEach(f => {
fs.unlink(f, err => { if (err) console.trace(err) });
try {
fs.unlink(f, err => { if (err) console.trace(err) });
} catch (err) {
console.trace(err);
}
}); });
exports.cleanupFiles = []; exports.cleanupFiles = [];



Loading…
Cancel
Save