[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: [PATCH] Write logs to $HOME/.gEDA/logs/.



On Sun, 2009-01-18 at 01:10 +0000, Peter TB Brett wrote:
> On Sunday 18 January 2009 01:07:13 Bob Paddock wrote:
> > > I'd appreciate comments as to whether this will work (or even compile)
> > > on Windows!
> >
> > +  dir_path = g_build_filename (g_getenv ("HOME"),
> > +                               ".gEDA", "logs", NULL);
> >
> > Should test to see if HOME really exists on Windows,
> > it usually doesn't by default.  You don't want to report
> > the failure of HOME not existing in the log during
> > the install process.
> >
> 
> What should it do if HOME doesn't exist? That seems like a pathological case. 
> Default to using the CWD?

No, we need to handle it via various fallbacks. There are I believe GLib
routines to find the dir we want.

Typically $HOME is not correct though. $HOMEDRIVE$HOMEPATH might be
closer, but we should actually be storing app config in the per-user
Application Data folder. I'm not sure where log files ought to go. There
_is_ a per user temp dir in Windows though - which might be a good idea
to make use of. (We might expect that old files get cleared
periodically, but I'm not sure)

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user