Commit f72d1aac authored by nanahira's avatar nanahira

Merge branch 'mc'

parents f4ab2b17 f467d763
...@@ -100,14 +100,6 @@ var readDeck = function(deck_name, deck_full_path) { ...@@ -100,14 +100,6 @@ var readDeck = function(deck_name, deck_full_path) {
//读取指定文件夹中所有卡组 //读取指定文件夹中所有卡组
var getDecks = function(callback) { var getDecks = function(callback) {
var decks=[]; var decks=[];
var decks_list = fs.readdirSync(config.deck_path);
for (var k in decks_list) {
var deck_name = decks_list[k];
if (_.endsWith(deck_name, ".ydk")) {
var deck = readDeck(deck_name, config.deck_path+deck_name);
decks.push(deck);
}
}
_async.auto({ _async.auto({
readDir: (done) => { readDir: (done) => {
fs.readdir(config.deck_path, done); fs.readdir(config.deck_path, done);
...@@ -195,7 +187,7 @@ var UploadToChallonge = function () { ...@@ -195,7 +187,7 @@ var UploadToChallonge = function () {
var receiveDecks = function(files, callback) { var receiveDecks = function(files, callback) {
var result = []; var result = [];
_async.each(files, (file, done) => { _async.eachSeries(files, (file, done) => {
if (_.endsWith(file.name, ".ydk")) { if (_.endsWith(file.name, ".ydk")) {
var deck = readDeck(file.name, file.path); var deck = readDeck(file.name, file.path);
if (deck.main.length >= 40) { if (deck.main.length >= 40) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment