Re: [AD] al_make_recursive_directory |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sat, 2010-10-23 at 17:33 +1100, Peter Wang wrote:
> On 2010-10-22, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> > On Fri, 2010-10-22 at 09:32 +1100, Peter Wang wrote:
> > >
> > > Any reason not to just extend al_make_directory?
> > >
> >
> > Hm, thinking about it, that's the most useful behavior as it's very
> > unlikely you want the function to fail if the parent doesn't exist. The
> > attached patch changes is accordingly.
>
> There are numerous problems with the patch, which you will discover if
> you try it ;)
Yes, it was just pseudo-code, I discovered as soon as I compiled, right
after posting here... thought I had compiled before :P Anyway, was
trivial to fix.
> I assume if the path already exists and is a directory then
> al_make_directory should return true.
True.
> Also I think the behaviour
> should be pushed down to the fshook implementations.
>
Why? Makes sense to me to have a function which can just do what the
standard "mkdir" does and do the high level logic in a platform
independent way. (And it means less lines of code need to be modified
since the path handling is done only one instead of for each
implementation.)
--
Elias Pschernig <elias.pschernig@xxxxxxxxxx>