[Groonga-commit] droonga/fluent-plugin-droonga at c710747 [master] Resolve path to the database based on the location of the catalog file

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Sep 27 18:06:07 JST 2013


YUKI Hiroshi	2013-09-27 18:06:07 +0900 (Fri, 27 Sep 2013)

  New Revision: c710747b21a507f107153740b5a5c1ba3976f255
  https://github.com/droonga/fluent-plugin-droonga/commit/c710747b21a507f107153740b5a5c1ba3976f255

  Message:
    Resolve path to the database based on the location of the catalog file

  Modified files:
    lib/droonga/catalog.rb

  Modified: lib/droonga/catalog.rb (+5 -0)
===================================================================
--- lib/droonga/catalog.rb    2013-09-27 18:01:15 +0900 (05f9dcc)
+++ lib/droonga/catalog.rb    2013-09-27 18:06:07 +0900 (0393886)
@@ -57,6 +57,10 @@ module Droonga
       @catalog_path = File.expand_path(catalog_path)
     end
 
+    def base_path
+      @base_path ||= File.dirname(catalog_path)
+    end
+
     def option(name)
       @options[name]
     end
@@ -73,6 +77,7 @@ module Droonga
             partitions.each do |partition|
               if partition =~ pattern
                 path = File.join([device, $POSTMATCH, 'db'])
+                path = File.expand_path(base_path)
                 options = {
                   :database => path,
                   :n_workers => workers,
-------------- next part --------------
HTML����������������������������...
下载 



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