mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-20 10:26:44 +01:00
Redefined database path
This commit is contained in:
parent
f90780102f
commit
d3c251a6db
4 changed files with 5 additions and 6 deletions
|
@ -242,7 +242,7 @@ class MetaData:
|
|||
slackpkg_lib_path = "/var/lib/slackpkg/"
|
||||
|
||||
# database name
|
||||
db = "database.slpkg"
|
||||
db = "/database/database.slpkg"
|
||||
|
||||
# computer architecture
|
||||
if comp_arch in ["off", "OFF"]:
|
||||
|
|
|
@ -81,10 +81,9 @@ class Initialization(Utils):
|
|||
def database(self):
|
||||
"""Initializing the database
|
||||
"""
|
||||
self.db = "database.slpkg"
|
||||
db_lib = self.lib_path + "database/"
|
||||
db_lib = self.lib_path + self.meta.db
|
||||
self.make_dirs([db_lib])
|
||||
self.con = sqlite3.connect(db_lib + self.db)
|
||||
self.con = sqlite3.connect(db_lib)
|
||||
self.cur = self.con.cursor()
|
||||
|
||||
def make_dir(self, path: list):
|
||||
|
|
|
@ -34,7 +34,7 @@ class Database:
|
|||
self.table_name = table_name
|
||||
self.text_file = text_file
|
||||
self.db = _meta_.db
|
||||
self.con = sqlite3.connect(f"{self.lib_path}database/{self.db}")
|
||||
self.con = sqlite3.connect(f"{self.lib_path}{self.db}")
|
||||
self.cur = self.con.cursor()
|
||||
|
||||
def table_exists(self):
|
||||
|
|
|
@ -35,7 +35,7 @@ class SBoGrep(Utils):
|
|||
self.meta = _meta_
|
||||
self.db = self.meta.db
|
||||
self.arch64 = "x86_64"
|
||||
self.sbo_db = f"{self.meta.lib_path}database/{self.db}"
|
||||
self.sbo_db = f"{self.meta.lib_path}{self.db}"
|
||||
self.con = sqlite3.connect(self.sbo_db)
|
||||
self.cur = self.con.cursor()
|
||||
|
||||
|
|
Loading…
Reference in a new issue