mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Update async library to 2.x
This commit is contained in:
parent
24153027d9
commit
827f1e614a
12
lib/logs.js
12
lib/logs.js
@ -97,13 +97,21 @@ Logs.prototype.logFiles = function (callback) {
|
||||
|
||||
async.filter(files, function (file, cb) {
|
||||
fs.stat(file.path, function (err, stat) {
|
||||
if (err) {
|
||||
return cb(err)
|
||||
}
|
||||
|
||||
file.created = stat.birthtime.toISOString()
|
||||
file.modified = stat.mtime.toISOString()
|
||||
file.formattedSize = filesize(stat.size)
|
||||
file.size = stat.size
|
||||
cb(!err && stat.isFile())
|
||||
cb(null, stat.isFile())
|
||||
})
|
||||
}, function (files) {
|
||||
}, function (err, files) {
|
||||
if (err) {
|
||||
return callback(err)
|
||||
}
|
||||
|
||||
files.sort(function (a, b) {
|
||||
return b.created.localeCompare(a.created) // Descending order
|
||||
})
|
||||
|
@ -19,7 +19,7 @@
|
||||
"dependencies": {
|
||||
"arma-class-parser": "^1.1.1",
|
||||
"arma-server": "0.0.10",
|
||||
"async": "^0.9.0",
|
||||
"async": "^2.6.4",
|
||||
"backbone": "1.3.3",
|
||||
"backbone.bootstrap-modal": "https://github.com/powmedia/backbone.bootstrap-modal/archive/632210077c2424be2ee6ea2aafe0d3fe016ae524.tar.gz",
|
||||
"backbone.marionette": "2.4.7",
|
||||
|
Loading…
Reference in New Issue
Block a user