branch: externals/detached
commit 950b1533abd5cf7950085d70df21da95b74deb0f
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Update name of database file
---
detached.el | 6 +++---
test/detached-test.el | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/detached.el b/detached.el
index deebce7329..0c3cede012 100644
--- a/detached.el
+++ b/detached.el
@@ -1055,7 +1055,7 @@ Optionally make the path LOCAL to host."
(defun detached--db-initialize ()
"Return all sessions stored in database."
- (let ((db (expand-file-name "detached.db" detached-db-directory)))
+ (let ((db (expand-file-name "detached-sessions.db" detached-db-directory)))
(when (file-exists-p db)
(with-temp-buffer
(insert-file-contents db)
@@ -1107,7 +1107,7 @@ Optionally make the path LOCAL to host."
(defun detached--db-update-sessions ()
"Write `detached--sessions' to database."
(detached-initialize-sessions)
- (let ((db (expand-file-name "detached.db" detached-db-directory)))
+ (let ((db (expand-file-name "detached-sessions.db" detached-db-directory)))
(with-temp-file db
(insert (format ";; Detached Session Version: %s\n\n"
detached-session-version))
(prin1 detached--sessions (current-buffer)))))
@@ -1318,7 +1318,7 @@ session and trigger a state transition."
If event is cased by an update to the `detached' database, re-initialize
`detached--sessions'."
(pcase-let* ((`(,_descriptor ,action ,file) event)
- (database-updated (and (string-match "detached.db$" file)
+ (database-updated (and (string-match "detached-sessions.db$"
file)
(or (eq 'attribute-changed action)
(eq 'changed action)))))
(when database-updated
diff --git a/test/detached-test.el b/test/detached-test.el
index 7b7989d5c2..fb6c2ce012 100644
--- a/test/detached-test.el
+++ b/test/detached-test.el
@@ -31,7 +31,7 @@
(defmacro detached-test--with-temp-database (&rest body)
"Initialize a detached database and evaluate BODY."
`(let* ((temp-directory (make-temp-file "detached" t))
- (detached-db-directory (expand-file-name "detached.db"
temp-directory))
+ (detached-db-directory (expand-file-name "detached-sessions.db"
temp-directory))
(detached-session-directory (expand-file-name "sessions"
temp-directory))
(detached--sessions)
(detached--sessions-initialized))