Commit ddd7e66f authored by Medicean's avatar Medicean

fix #97 thx @jjf012

parent 4a094464
...@@ -183,7 +183,7 @@ class Base { ...@@ -183,7 +183,7 @@ class Base {
parseEncoder(enc) { parseEncoder(enc) {
// 加载编码器 // 加载编码器
// QAQ!我也不知道为什么,如果直接require变量名,babel编译就会warning,so我只好加个`咯~ // QAQ!我也不知道为什么,如果直接require变量名,babel编译就会warning,so我只好加个`咯~
this['__encoder__'][enc.split(`encoder${path.sep}`)[1]] = require(`${enc}`); this['__encoder__'][enc.split(`encoder/`||`encoder\\`)[1]] = require(`${enc}`);
} }
/** /**
......
...@@ -637,7 +637,7 @@ class FileManager { ...@@ -637,7 +637,7 @@ class FileManager {
}).then((filePaths) => { }).then((filePaths) => {
// 初始化任务 // 初始化任务
filePaths.map((f) => { filePaths.map((f) => {
const fileName = f.substr(f.lastIndexOf('/') + 1); const fileName = f.substr(f.lastIndexOf(PATH.sep) + 1);
tasks[f] = this.tasks.new(LANG['upload']['task']['name'], `${fileName} => ${path}`, 'Waiting for uploading..'); tasks[f] = this.tasks.new(LANG['upload']['task']['name'], `${fileName} => ${path}`, 'Waiting for uploading..');
}); });
return filePaths; return filePaths;
...@@ -661,7 +661,7 @@ class FileManager { ...@@ -661,7 +661,7 @@ class FileManager {
} }
let task = tasks[filePath]; let task = tasks[filePath];
// 获取文件名 // 获取文件名
let fileName = filePath.substr(filePath.lastIndexOf('/') + 1); let fileName = filePath.substr(filePath.lastIndexOf(PATH.sep) + 1);
// 读取文件buff // 读取文件buff
let fileBuff; let fileBuff;
try { try {
......
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