susumu.yata
null+****@clear*****
Fri Jun 21 12:45:44 JST 2013
susumu.yata 2013-06-21 12:45:44 +0900 (Fri, 21 Jun 2013) New Revision: 7ac9b890a2e288e0d9a00775c3d4ef7b64cfc041 https://github.com/groonga/grnxx/commit/7ac9b890a2e288e0d9a00775c3d4ef7b64cfc041 Message: Fix a bug that Storage::open_or_create() logs an error if missing. Modified files: lib/grnxx/storage/storage_impl.cpp Modified: lib/grnxx/storage/storage_impl.cpp (+4 -1) =================================================================== --- lib/grnxx/storage/storage_impl.cpp 2013-06-21 11:05:27 +0900 (fa6fecf) +++ lib/grnxx/storage/storage_impl.cpp 2013-06-21 12:45:44 +0900 (aa75501) @@ -512,7 +512,10 @@ bool StorageImpl::open_or_create_storage(const char *path, StorageFlags flags, if (flags & STORAGE_HUGE_TLB) { flags_ |= STORAGE_HUGE_TLB; } - std::unique_ptr<File> header_file(File::open(path)); + std::unique_ptr<File> header_file; + if (File::exists(path)) { + header_file.reset(File::open(path)); + } if (header_file) { // Open an existing storage. std::unique_ptr<Chunk> root_chunk( -------------- next part -------------- HTML����������������������������...Download