diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-22 17:32:51 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-22 17:32:51 +0200 |
commit | 44bb59f79e7ea7928b12a1f3eb8b5ada0265c1d0 (patch) | |
tree | c43a81123be540971c939ecb5328123a241a1c4e /lisp/play/gamegrid.el | |
parent | 10696d0ac51b9a92359ab7cb2c2e0a28d186dd52 (diff) | |
download | emacs-44bb59f79e7ea7928b12a1f3eb8b5ada0265c1d0.tar.gz |
Ensure that the game directory exists before trying to write to it
* lisp/play/gamegrid.el (gamegrid-add-score-insecure): Make the
directory if it doesn't exist (bug#37836).
Diffstat (limited to 'lisp/play/gamegrid.el')
-rw-r--r-- | lisp/play/gamegrid.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index 9b74eb913e0..74e6c2d034d 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -635,6 +635,8 @@ FILE is created there." (save-excursion (setq file (expand-file-name file (or directory temporary-file-directory))) + (unless (file-exists-p (file-name-directory file)) + (make-directory (file-name-directory file) t)) (find-file-other-window file) (setq buffer-read-only nil) (goto-char (point-max)) |