YUKI Hiroshi
null+****@clear*****
Fri Dec 7 16:33:04 JST 2012
YUKI Hiroshi 2012-12-07 16:33:04 +0900 (Fri, 07 Dec 2012) New Revision: cfe07e8d4f920c4c2e8c1206bb4ee1b2ee2b4eec https://github.com/groonga/gcs/commit/cfe07e8d4f920c4c2e8c1206bb4ee1b2ee2b4eec Log: Return null from readSync for missing file Modified files: lib/database/storage.js Modified: lib/database/storage.js (+2 -2) =================================================================== --- lib/database/storage.js 2012-12-07 16:32:35 +0900 (33feb46) +++ lib/database/storage.js 2012-12-07 16:33:04 +0900 (ddc993d) @@ -52,8 +52,8 @@ FileStorage.prototype = { if (!this.directoryExistsSync()) return null; - var filePath = this.idToFilePath(document.id); - if (path.existsSync(filePath)) + var filePath = this.idToFilePath(id); + if (!path.existsSync(filePath)) return null; var contents = fs.readFileSync(filePath, 'UTF-8'); -------------- next part -------------- HTML����������������������������...다운로드