Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fs.readdir(dir, function(error, files) {
if (error) {
console.log(error);
window.alert(error);
return;
}
for (var i = 0; i < files.length; ++i) {
files[i] = mime.stat(path.join(dir, files[i]));
}
self.element.html(gen_files_view({ files: files }));
});
}
this.element.delegate('.file', 'dblclick', function() {
var file_path = $(this).attr('data-path');
self.emit('navigate', file_path, mime.stat(file_path));
});
}