mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 18:23:35 +00:00
chore(cloudcmd) sendContent
This commit is contained in:
parent
444f17e448
commit
f4f2630c7a
1 changed files with 6 additions and 6 deletions
12
cloudcmd.js
12
cloudcmd.js
|
|
@ -235,14 +235,14 @@
|
|||
p = pParams;
|
||||
p.name = Util.removeStrOneTime(p.name, CloudFunc.FS) || main.SLASH;
|
||||
|
||||
fs.stat(p.name, function(pError, pStat) {
|
||||
if (!pError)
|
||||
if ( pStat.isDirectory() )
|
||||
fs.stat(p.name, function(error, stat) {
|
||||
if (error)
|
||||
main.sendError(pParams, error);
|
||||
else
|
||||
if (stat.isDirectory())
|
||||
processContent(pParams);
|
||||
else
|
||||
main.sendFile( pParams );
|
||||
else
|
||||
main.sendError(pParams, pError);
|
||||
main.sendFile(pParams);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue