mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(cloudcmd) readIndex -> buildIndex
This commit is contained in:
parent
5cd04d0191
commit
882252432d
1 changed files with 5 additions and 5 deletions
10
cloudcmd.js
10
cloudcmd.js
|
|
@ -241,9 +241,9 @@
|
|||
name = Util.rmStrOnce(name, CloudFunc.FS) || main.SLASH;
|
||||
path = mellow.convertPath(name);
|
||||
|
||||
mellow.read(path, function(error, data) {
|
||||
if (data)
|
||||
data.path = format.addSlashToEnd(name);
|
||||
mellow.read(path, function(error, dir) {
|
||||
if (dir)
|
||||
dir.path = format.addSlashToEnd(name);
|
||||
|
||||
if (error)
|
||||
if (error.code === 'ENOTDIR') {
|
||||
|
|
@ -253,7 +253,7 @@
|
|||
main.sendError(p, error);
|
||||
}
|
||||
else
|
||||
readIndex(data, function(error, data) {
|
||||
buildIndex(dir, function(error, data) {
|
||||
var NOT_LOG = true;
|
||||
|
||||
p.name = PATH_INDEX;
|
||||
|
|
@ -268,7 +268,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function readIndex(json, callback) {
|
||||
function buildIndex(json, callback) {
|
||||
var isMinify = Minify && Config.minify;
|
||||
|
||||
Util.exec.if(!isMinify, function(error, params) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue