I noticed that if I have a Filesystem.System object and I chroot(),
calling get_dir() with an absolute path will break out of the chroot. This
doesn't happen with get_stat(), and it seems like it might be a bug.
For example:
Filesystem.System("/etc")->chroot("/etc")->get_dir("/")
returns a list of items in the system root (/). If I do the same thing but
replace the get_dir with get_stat(), I get a list of stat objects for
/etc. The latter (get_stat) behavior seems correct to me.
Can anyone confirm that the current behavior is actually correct? If not,
I'll look into fixing it.
Best,
Bill