[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: gamegrid-add-score fails]
From: |
Jesper Harder |
Subject: |
Re: address@hidden: gamegrid-add-score fails] |
Date: |
Fri, 28 Feb 2003 03:48:27 +0100 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 |
address@hidden writes:
> Jesper Harder <address@hidden> writes:
>
>> I now get this backtrace with the lates Emacs from CVS:
>>
>> (gamegrid-add-score "baz" 10)
>> =>
>>
>> Debugger entered--Lisp error: (error "/home/harder/.emacs.d/games/foo: no
>> such directory")
>
> I can not reproduce this with my patched version. [..] Are you sure
> the the right version of gamegrid.el is loaded?
Yep. The error occurs because the directory
`gamegrid-user-score-file-directory' (i.e. '~/.emac.d/games/' on my
system) doesn't exist. Emacs should probably create it if it doesn't
exist.
> It is very possible that there is no "/tmp" directory on the system.
Yes. You shouldn't use "/tmp" literally, of course, but
`temporary-file-directory' instead.
> Does it break any existing packages the way it is now?
Yes, at least one, which was why I noticed.
The way to use `gamegrid-add-score' before the change was to supply an
absolute filename. E.g. this was how the bundled games did it in Emacs
21.2:
snake.el:(defvar snake-score-file (concat temporary-file-directory
"snake-scores")
tetris.el:(defvar tetris-score-file (concat temporary-file-directory
"tetris-scores")
I'd strongly suspect that every non-bundled game does something similar.
Backward compatibility would be nice, if possible. But I don't
understand the security problem in the first place, so I have no idea if
it _is_ possible.