[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Player records
From: |
Joern Thyssen |
Subject: |
Re: [Bug-gnubg] Player records |
Date: |
Thu, 3 Oct 2002 08:42:08 +0000 |
User-agent: |
Mutt/1.4i |
On Thu, Oct 03, 2002 at 09:19:05AM +0100, Ian Shaw wrote
>
> >
> > The logic for adding a player's record is:
> >
> > * read records from .gnubgpr
> > * calculate new records
> > * write new records to .gnubgprXXXXX
> > * rename .gnubgprXXXXX to .gnubgpr
> >
> > However, for some reason the last step fails on wintendo.
> > I've modified
> > the logic to:
> >
> > * read records from .gnubgpr
> > * calculate new records
> > * write new records to .gnubgprXXXXX
> > * delete .gnubgpr
> > * rename .gnubgprXXXXX to .gnubgpr
> >
> > which apparently seems to work -- don't ask me why :-)
> >
> This is standard for Windows. You can't rename a file to something
> that already exists, 'coz then you'd have two files of the same name
> in a directory. I guess the Unix philosophy assumes you know what you
> are doing and that you WANT to overwrite the existing file,
Yes, rename/move are synonymous under unix.
> whereas
> Windows assumes that you DON'T know what you're doing.
Exactly! This is probably one of the reasons why I detest using windows :-)
> The other
> thing that Win programs often do is to rename .gnubgpr to .gnubgpr.bak
> at step 4
Yes, but then I'll have to add logic to delete .gnubgpr.bak before step 4 :-)
>
> One thing that Win files don't do is have filenames beginning with "."
> because that marks the file type. Is there a good Unix reason to have
> this sort of name.
Yes! Your personal settings are always stored in a file or directory
that starts with dot. My home directory is /home/jth (corresponds to
C:\Documents and Settings\jth in Win2K). My personal settings for gnubg
are stored in a file .gnubgrc, settings for Mozilla in a directory
.mozilla, settings for my mail program in .mutt etc etc. My wifes
personal settings are stored in /home/malene. So my wife and I can have
separate settings.
The program for listing files (ls) doesn't show files starting with '.'
as default, similar to the dos attribute "hidden".
> In windows it would be more usual to have a
> filename such as gnubg.ini for initialisation files, and records.dat
> for the player records.
Yes, it might be an idea to change this.
Jørn
--
Joern Thyssen, PhD
Vendsysselgade 3, 3., DK-9000 Aalborg, Denmark
+45 9813 2791 (private) / +45 2818 0183 (mobile) / +45 9633 7036 (work)
Note: new mobile number!