mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(rest) onFSGet
This commit is contained in:
parent
831982faea
commit
e9e4df5042
1 changed files with 3 additions and 3 deletions
|
|
@ -340,13 +340,13 @@
|
|||
default:
|
||||
fs.stat(name, function(error, stat) {
|
||||
var getDirContent = main.commander.getDirContent,
|
||||
isFile = !stat.isDirectory();
|
||||
isDir = stat && stat.isDirectory();
|
||||
|
||||
if (error)
|
||||
func(error);
|
||||
else
|
||||
if (isFile)
|
||||
func(null, null, null, isFile);
|
||||
if (!isDir)
|
||||
func(null, null, null, !isDir);
|
||||
else
|
||||
getDirContent(name, function(error, data) {
|
||||
if (!error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue