chore(cloudcmd) sendContent

This commit is contained in:
coderaiser 2014-02-10 08:04:54 -05:00
parent 444f17e448
commit f4f2630c7a

View file

@ -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);
});
}