Re: [AD] al_make_recursive_directory |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2010-10-23, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> On October 23, 2010, Elias Pschernig wrote:
> > On Sun, 2010-10-24 at 10:19 +1100, Peter Wang wrote:
> > > > Here's the real patch.
> > >
> > > Actually this is the real real patch.
> >
> > Well, shows that we need the function in any case, much less trivial
> > than it seemed :)
> >
> > > The reason I think the logic should be pushed into the fshook
> > > implementations is that some file systems may not recognise '/' as
> > > directory separators
> >
> > Hm, ALLEGRO_NATIVE_PATH_SEP should always work though, else we have
> > another usability problem.
I dunno. ALLEGRO_NATIVE_PATH_SEP should be used with the path API, and
both assume you are dealing with the _native_ filesystem, or something
close. If you are working with something exotic then the fshook API
doesn't care (mostly[1]), but you get no help from the path API.
[1] al_get_current_directory and al_get_fs_entry_name return
ALLEGRO_PATHs instead of strings. This might be a mistake.
> > > and they may not *need* parent directories to be
> > >
> > > created separately.
> >
> > I see. Well, right now the only place it is needed is in fshooks.c
> > anyway - the physfs version already creates all parent directories if
> > they are missing [1].
> >
> > [1]
> > http://icculus.org/physfs/docs/html/physfs_8h.html#ae11fb98bf8c08a2e028f52
> > ac9a728aa9
>
> It would make more sense to put it in the stdio driver rather than fshooks.c
I've made the change.
Peter