Commit ddd7e66f authored by Medicean's avatar Medicean

fix #97 thx @jjf012

parent 4a094464
......@@ -183,7 +183,7 @@ class Base {
parseEncoder(enc) {
// 加载编码器
// 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 {
}).then((filePaths) => {
// 初始化任务
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..');
});
return filePaths;
......@@ -661,7 +661,7 @@ class FileManager {
}
let task = tasks[filePath];
// 获取文件名
let fileName = filePath.substr(filePath.lastIndexOf('/') + 1);
let fileName = filePath.substr(filePath.lastIndexOf(PATH.sep) + 1);
// 读取文件buff
let fileBuff;
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