We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e966594 commit a008467Copy full SHA for a008467
cve_bin_tool/version_signature.py
@@ -40,7 +40,10 @@ def dbname(self) -> str:
40
41
def open(self) -> None:
42
"""Opens connection to sqlite database."""
43
- self.conn = sqlite3.connect(self.dbname)
+ # Ensure the cache directory exists before connecting
44
+ db_path = Path(self.dbname)
45
+ db_path.parent.mkdir(parents=True, exist_ok=True)
46
+ self.conn = sqlite3.connect(db_path)
47
self.cursor = self.conn.cursor()
48
49
def close(self) -> None:
0 commit comments