Opened 14 years ago

Closed 14 years ago

#77 closed task (fixed)

opening stores with relative paths

Reported by: lgiessmann Owned by: lgiessmann
Priority: major Milestone: miscellaneous 2010
Component: xml-im/exporter Version: 0.1
Keywords: Cc:

Description

TODO: let generate xml-importer:get-store-spec an absolute path corresponding to the users relative path

Hi Ian, hi Alex,

I have a problem when I use elephant:open-store with relative paths to the db-folder.
When a relative path is given elephant:get-instances-by-class returns after the store was closed always NIL.

Here is a little example:

(asdf:operate 'asdf:load-op :elephant)

(elephant:defpclass TopicC ()

((value :initarg :value

:accessor value
:type string))

(:index t))

(elephant:open-store '(:BDB "/home/lukas/.sbcl/site/isidorus/trunk/src/data_base"))
(make-instance 'TopicC :value "t-1")
(make-instance 'TopicC :value "t-2")
(elephant:get-instances-by-class 'TopicC)
; absolute db path => (#<TOPICC oid:2> #<TOPICC oid:3>)
; relative db path => (#<TOPICC oid:2> #<TOPICC oid:3>)

(elephant:close-store)

(elephant:open-store '(:BDB "/home/lukas/.sbcl/site/isidorus/trunk/src/data_base"))
(elephant:get-instances-by-class 'TopicC)
; absolute db path => (#<TOPICC oid:2> #<TOPICC oid:3>)
; relative db path => NIL

Is this a bug or must I use absolute paths for opening a store?

Best regards

Lukas

Change History (2)

comment:1 Changed 14 years ago by lgiessmann

Status: newaccepted

comment:2 Changed 14 years ago by lgiessmann

Resolution: fixed
Status: acceptedclosed

problem is already fixed; it only appears if the open-store function is called with a manually created relative store-spec, e.g. '(:BDB "./")

Note: See TracTickets for help on using tickets.