[physfs] Filtering which directories are allowed

Sik the hedgehog sik.the.hedgehog at gmail.com
Wed Jun 26 15:34:20 EDT 2013


I was looking for a solution that doesn't require modifying PhysicsFS :P

I was thinking of a quick hack which would involve just not mounting
those files in the root, but that means filenames start looking uglier
and I'll need to change code all over the place :P But at least I
wouldn't risk user files interfering with the ones I don't want to be
changed.

A proper way to filter directories still would be nice, I imagine I'm
not the only one who would find such functionality useful.

2013/6/26, Indy Sams <indy at driftsolutions.com>:
> Hello Sik,
>
> You could do this by making a custom archiver that calls one of the real
> archivers to actually read the files.
> Then just check the paths passed to your archiver to filter out any
> directories you don't want.
>
> Wednesday, June 26, 2013, 3:08:14 PM, you wrote:
>
> Sth> Silly question, is there any way to filter which directories can be
> Sth> loaded when mounting an archive? For example, I want to allow mods in
> Sth> my game by letting users put files in a 7z archive, but I want to make
> Sth> sure only files within specific folders inside the archive can get
> Sth> mounted (for the sake of extra sandboxing). With directories I can
> Sth> just generate the directory names I want and mount them separately,
> Sth> with archives as far as I know I can't do something like that.
>
> Sth> If not possible, would it be possible to add functionality for
> Sth> something like this to PhysicsFS?
>
> Sth> PS: as you can imagine all those archives would get mounted at the
> Sth> root of the virtual filesystem, so filtering which directories are
> Sth> mountable is also an acceptable solution for me.
> Sth> _______________________________________________
> Sth> physfs mailing list
> Sth> physfs at icculus.org
> Sth> http://icculus.org/mailman/listinfo/physfs
>
>
>
> Best regards,
>  Indy Sams
>  mailto:indy at driftsolutions.com
>
> _______________________________________________
> physfs mailing list
> physfs at icculus.org
> http://icculus.org/mailman/listinfo/physfs
>


More information about the physfs mailing list