emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql 0d901004b9 4/6: emacsql-sqlite-open: Ensure direct


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 0d901004b9 4/6: emacsql-sqlite-open: Ensure directory containing database file exists
Date: Sun, 17 Nov 2024 18:59:37 -0500 (EST)

branch: elpa/emacsql
commit 0d901004b9b01965375505b51bdad780e53b1718
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    emacsql-sqlite-open: Ensure directory containing database file exists
---
 emacsql-sqlite.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index d799db1626..1d2433e053 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -110,6 +110,8 @@ purposes.  Always enable support for foreign key constrains.
 If optional SETUP is non-nil, it must be a function, which takes the
 connection as only argument.  This function can be used to initialize
 tables, for example."
+  (when file
+    (make-directory (file-name-directory file) t))
   (let* ((class (emacsql-sqlite-default-connection))
          (connection (make-instance class :file file)))
     (when debug



reply via email to

[Prev in Thread] Current Thread [Next in Thread]