feature(cloudcmd) fs: add realpath

This commit is contained in:
coderaiser 2014-09-11 15:04:19 +00:00
parent c8a4817e1d
commit 188989a412
2 changed files with 18 additions and 8 deletions

View file

@ -161,8 +161,13 @@
};
if (isFile) {
params.gzip = false;
ponse.sendFile(params);
fs.realpath(path, function(error, path) {
if (!error)
params.name = path;
params.gzip = false;
ponse.sendFile(params);
});
} else {
if (!error) {
data.path = format.addSlashToEnd(p.name);