branch: externals/dtache commit 8bc68c10806c62659bafc92e859da11dfc7b7025 Author: Niklas Eklund <niklas.ekl...@zenseact.com> Commit: Niklas Eklund <niklas.ekl...@posteo.net>
Update dtache--session-directory-event Use when-let instead of let in order to capture the edge case when dtache--db-get-session for an id returns nil. This could happen if the user kills and removes a session at the same time. --- dtache.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtache.el b/dtache.el index e627ab17d9..42f183271e 100644 --- a/dtache.el +++ b/dtache.el @@ -1116,9 +1116,9 @@ session and trigger a state transition." (pcase-let* ((`(,_ ,action ,file) event)) (when (and (eq action 'deleted) (string= "socket" (file-name-extension file))) - (let* ((id (intern (file-name-base file))) - (session (dtache--db-get-session id)) - (session-directory (dtache--session-directory session))) + (when-let* ((id (intern (file-name-base file))) + (session (dtache--db-get-session id)) + (session-directory (dtache--session-directory session))) ;; Update session (dtache--session-state-transition-update session)