added fixes for missing database path
This commit is contained in:
parent
5cac0e6e07
commit
2c6d60494a
1 changed files with 3 additions and 1 deletions
|
|
@ -48,7 +48,9 @@ class KuzuAdapter(GraphDBInterface):
|
||||||
try:
|
try:
|
||||||
# For Kuzu v0.11.0+, create parent directory but use db_path as file
|
# For Kuzu v0.11.0+, create parent directory but use db_path as file
|
||||||
parent_dir = os.path.dirname(self.db_path)
|
parent_dir = os.path.dirname(self.db_path)
|
||||||
os.makedirs(parent_dir, exist_ok=True)
|
# Only create directory if parent_dir is not empty (i.e., db_path has a directory component)
|
||||||
|
if parent_dir:
|
||||||
|
os.makedirs(parent_dir, exist_ok=True)
|
||||||
|
|
||||||
self.db = Database(self.db_path)
|
self.db = Database(self.db_path)
|
||||||
self.db.init_database()
|
self.db.init_database()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue