fix(upload-files) upload a file to an empty root directory (#113)

This commit is contained in:
coderaiser 2017-04-18 10:46:41 +03:00
parent a3ce48f14f
commit 7b240cab34

View file

@ -10,15 +10,18 @@ const load = require('./load');
const Images = require('./images');
const {FS} = require('../../common/cloudfunc');
const {CurrentInfo} = DOM;
const onEnd = wraptile(_onEnd);
const loadFile = wraptile(_loadFile);
const {
getCurrentDirPath: getPathWhenRootEmpty
} = DOM;
module.exports = (dir, files) => {
if (!files) {
files = dir;
dir = CurrentInfo.dirPath;
dir = getPathWhenRootEmpty();
}
const n = files.length;