[VOTE] Re: directory-handling with nALFS
Kevin P. Fleming
kpfleming at linuxfromscratch.org
Fri Apr 2 11:52:59 PST 2004
James Robertson wrote:
>> I very like logging too, but that's no reason to raise an error.
>> In case that the directory has already been created (by a former run)
>> it's easy to add a log-message telling you about the situation.
>> So you have your log-entry and the process needs not to fail/stop.
>> Could that be a compromise?
> Yes, that would be fine and as you mentioned, make it an option in the
> rc file.
The problem I see with this approach is that the DTD does not specify
exactly what types of paths can be specified to <mkdir>. As it stands
today, nALFS just passes it along to mkdir via a shell command, so that
means the path can be anything that the shell would accept.
To check ahead of time whether the directory already exists requires
nALFS to do a stat() call on the supplied path, and if the path contains
shell special characters (globbing or anything else, like ~), this will
fail and won't be able to tell that the directory already exists.
More information about the alfs-discuss