diff --git a/lib/spreadsheets/Spreadsheets.js b/lib/spreadsheets/Spreadsheets.js index 930b4bb..9ae2464 100644 --- a/lib/spreadsheets/Spreadsheets.js +++ b/lib/spreadsheets/Spreadsheets.js @@ -268,7 +268,7 @@ Spreadsheet.prototype.download = function(format, out, callback) { core.download.call(self, opt, "", callback); function _create(pathname) { - if(path.existsSync(pathname)) + if(fs.existsSync(pathname)) if(fs.statSync(pathname).isDirectory()) return _create(path.join(pathname, $("title", self._xml).text() + "." + format)); else {