Re: [AD] standard path updates |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On January 6, 2011, Matthew Leverton wrote:
> On Thu, Jan 6, 2011 at 6:52 PM, Thomas Fjellstrom
>
> <tfjellstrom@xxxxxxxxxx> wrote:
> > That kind of defeats the entire purpose behind the swapable vfs setup. If
> > you're using a separate VFS you really aught to make sure stuff is
> > visible. Its something you should do consciously.
>
> Whether or not a VFS falls back gracefully to stdio is up to the
> programmer who writes it. If Allegro knows it must transparently open
> up a local file, then it should explicitly use stdio. Allegro should
> only use the VFS whenever the user expects that a file is being
> accessed (loading images, config files, etc); but that's not happening
> here.
I disagree. The user setup the vfs purposefully. They are saying "use this VFS
now, instead of what was set before". The reason we have the fshooks interface
is so allegro itself can transparently use a user provided VFS.
> Locating a system directory should technically be a system API call,
> but apparently no such thing commonly exists in Linux. (At least, it
> doesn't look like libxdg-basedir does this particular thing.) Linux
> should work just like OS X or Windows, where the VFS plays no role in
> locating the standard paths.
It wont on linux either. Just if the user sets up a VFS on ANY platform, it
will override the default interface, and potentially hide the root file system,
depending on the VFS chosen.
>
> It would only makes sense for a VFS to alter the behavior of
> al_get_standard_path if there was a ALLEGRO_FS_INTERFACE hook that it
> could use to intercept calls to it. But I'm not sure such a thing
> would even be useful.
It doesn't alter the behavior of al_get_standard_path, and shouldn't imo. I'm
not sure why you brought that up.
One normal use of the allegro fshooks/vfs setup is to use al_get_standard_path
to find the RESOURCE dir, load up physfs and mount an archive, or dir in the
RESOURCE dir to physfs, and continue on from there.
> --
> Matthew Leverton
>
> ---------------------------------------------------------------------------
> --- Gaining the trust of online customers is vital for the success of any
> company that requires sensitive data to be transmitted over the Web.
> Learn how to best implement a security strategy that keeps consumers'
> information secure and instills the confidence they need to proceed with
> transactions. http://p.sf.net/sfu/oracle-sfdevnl
--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx