From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7624df5e57d09688 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-10 08:42:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.columbus.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D04C8F9.21824DE2@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: config files proposal References: <3CFA8E42.B7844253@san.rr.com> <3CFAEEB5.CE3041C2@san.rr.com> <3D03DE18.9031B0F5@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 10 Jun 2002 15:42:23 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1023723743 66.75.151.160 (Mon, 10 Jun 2002 08:42:23 PDT) NNTP-Posting-Date: Mon, 10 Jun 2002 08:42:23 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:25680 Date: 2002-06-10T15:42:23+00:00 List-Id: Stephen Leake wrote: > > Darren New writes: > > > Stephen Leake wrote: > > > Good point. I guess I can check the write privs on the found file. > > > > Naw. > > Hmm. What if I find a "system" config file, that I _don't_ have write > priviledge for? Sorry. I forgot to finish that sentence. I meant "Naw, that's not good enough." Or would you want root changing the system configuration every time she ran your program? > > > Or provide two search paths; one read-only and one writeable. > > > > Or just require the full path to the config to be saved, and perhaps default > > it to where it was loaded from. I think if you try to "guess" which config > > file to clobber, you're going to guess wrong too often. > > With clear rules about it, there's no "guessing". Here's my proposed > rule: > > --- > There are two search paths; one for files that are read only, one for > files that are writeable. > > If the first config file is found on a read only path, the "flush" > operation creates a new file in the first directory of the writeable > path. > --- > > That gives total control to the client of the Config_Files package. That would work, yes. That's a good compirimse. Especially if one can change these paths at run-time, on a per-config-file basis. In that case, one could simply change the writable path to a single directory to force a config file to be written. I'd also suggest that it be legal to have a zero-length writable path, leading to an exception if an attempt is made to write the config file. (Or perhaps to have changes discarded?) Altho I must admit I see no reason for a writable *path* as such. -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://home.san.rr.com/dnew/DNResume.html ** ** http://images.fbrtech.com/dnew/ ** My brain needs a "back" button so I can remember where I left my coffee mug.