[Groonga-commit] groonga/grnxx at 6813294 [master] Use File::exists() to avoid an error in Storage::exists().

Back to archive index

susumu.yata null+****@clear*****
Tue Jun 25 15:12:06 JST 2013


susumu.yata	2013-06-25 15:12:06 +0900 (Tue, 25 Jun 2013)

  New Revision: 6813294cb53e3dea6fae968e1c3869453886bf09
  https://github.com/groonga/grnxx/commit/6813294cb53e3dea6fae968e1c3869453886bf09

  Message:
    Use File::exists() to avoid an error in Storage::exists().

  Modified files:
    lib/grnxx/storage/storage_impl.cpp

  Modified: lib/grnxx/storage/storage_impl.cpp (+3 -0)
===================================================================
--- lib/grnxx/storage/storage_impl.cpp    2013-06-25 12:46:38 +0900 (aa75501)
+++ lib/grnxx/storage/storage_impl.cpp    2013-06-25 15:12:06 +0900 (8a13b8d)
@@ -155,6 +155,9 @@ bool StorageImpl::exists(const char *path) {
     GRNXX_ERROR() << "invalid argument: path = nullptr";
     return false;
   }
+  if (!File::exists(path)) {
+    return false;
+  }
   std::unique_ptr<Storage> storage(open(path, STORAGE_READ_ONLY));
   if (!storage) {
     return false;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index