diff options
| author | Glenn Morris | 2013-02-04 21:03:51 -0500 |
|---|---|---|
| committer | Glenn Morris | 2013-02-04 21:03:51 -0500 |
| commit | 3505fa027b66c06bf5f86a71f291dbbdead9070e (patch) | |
| tree | fe68a02c833cd82dce68aea95ae10d2303829739 /lisp/play | |
| parent | 50fdf3998794e013c5cb752962e75b883422b75b (diff) | |
| download | emacs-3505fa027b66c06bf5f86a71f291dbbdead9070e.tar.gz emacs-3505fa027b66c06bf5f86a71f291dbbdead9070e.zip | |
gamegrid-add-score-with-update-game-score fix
* lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
Fix directory creation in fallback case.
Diffstat (limited to 'lisp/play')
| -rw-r--r-- | lisp/play/gamegrid.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index eefe1e22599..91192517f7c 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el | |||
| @@ -505,15 +505,13 @@ FILE is created there." | |||
| 505 | (make-directory gamegrid-user-score-file-directory t)) | 505 | (make-directory gamegrid-user-score-file-directory t)) |
| 506 | (gamegrid-add-score-insecure file score | 506 | (gamegrid-add-score-insecure file score |
| 507 | gamegrid-user-score-file-directory)) | 507 | gamegrid-user-score-file-directory)) |
| 508 | (t (let ((f (expand-file-name | 508 | (t |
| 509 | gamegrid-user-score-file-directory))) | 509 | (unless (file-exists-p |
| 510 | (when (file-writable-p f) | 510 | (directory-file-name gamegrid-user-score-file-directory)) |
| 511 | (unless (eq (car-safe (file-attributes f)) | 511 | (make-directory gamegrid-user-score-file-directory t)) |
| 512 | t) | 512 | (let ((f (expand-file-name file gamegrid-user-score-file-directory))) |
| 513 | (make-directory f)) | ||
| 514 | (setq f (expand-file-name file f)) | ||
| 515 | (unless (file-exists-p f) | 513 | (unless (file-exists-p f) |
| 516 | (write-region "" nil f nil 'silent nil 'excl))) | 514 | (write-region "" nil f nil 'silent nil 'excl)) |
| 517 | (gamegrid-add-score-with-update-game-score-1 file f score)))))) | 515 | (gamegrid-add-score-with-update-game-score-1 file f score)))))) |
| 518 | 516 | ||
| 519 | (defun gamegrid-add-score-with-update-game-score-1 (file target score) | 517 | (defun gamegrid-add-score-with-update-game-score-1 (file target score) |