mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(upload-files) upload a file to an empty root directory (#113)
This commit is contained in:
parent
a3ce48f14f
commit
7b240cab34
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue