susumu.yata
null+****@clear*****
Mon Jul 1 12:54:17 JST 2013
susumu.yata 2013-07-01 12:54:17 +0900 (Mon, 01 Jul 2013) New Revision: 85adbd16d83ee2f047eefc6d3df8486755bd0459 https://github.com/groonga/grnxx/commit/85adbd16d83ee2f047eefc6d3df8486755bd0459 Message: Suppress Storage::unlink()'s error. Modified files: lib/grnxx/storage/storage_impl.cpp Modified: lib/grnxx/storage/storage_impl.cpp (+5 -0) =================================================================== --- lib/grnxx/storage/storage_impl.cpp 2013-07-01 12:45:20 +0900 (be95cd1) +++ lib/grnxx/storage/storage_impl.cpp 2013-07-01 12:54:17 +0900 (adc419c) @@ -170,6 +170,11 @@ bool StorageImpl::unlink(const char *path) { GRNXX_ERROR() << "invalid argument: path = nullptr"; return false; } + // TODO: open() should have an option to be quiet. + if (!exists(path)) { + GRNXX_WARNING() << "failed to unlink: path = " << path; + return false; + } std::unique_ptr<StorageImpl> storage(open(path, STORAGE_READ_ONLY)); if (!storage) { return false; -------------- next part -------------- HTML����������������������������...Download