On Fri, Jul 20, 2012 at 2:20 PM, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum 10353@lyskom.lysator.liu.se wrote:
variable "full"). So putting back the / should restore compatibility with how it used to (and was supposed to) work before May 2001.
.) - ok then.
I saw that a few commits were made, but the behavior seems the same (at least to me):
Filesystem.System("/etc")->chroot("/etc")->get_dir("/");
(2) Result: ({ "bin", "cores", "dev", "etc", "home", "net", "private", "sbin", "usr", "var", })
Did I misunderstand (entirely likely)?
On Fri, 20 Jul 2012, Tobias S. Josefowitz wrote:
On Fri, Jul 20, 2012 at 2:20 PM, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum 10353@lyskom.lysator.liu.se wrote:
variable "full"). So putting back the / should restore compatibility with how it used to (and was supposed to) work before May 2001.
.) - ok then.
- if((a = file_stat(full = combine_path("/",root,full), lstat)))
This is also wrong. The stat->pullpath should not include root, it should be relative to the chroot point. The correct value is the of full before the initial / was removed. But you could also use "/"+full.
Example:
wd = "/foo/bar" root = "/gaz/onk" file = "../ho/hum.txt"
Value of full before file_stat(): "foo/ho/hum.txt"
Correct path to give to file_stat(): "/gaz/onk/foo/ho/hum.txt" Correct value to set stat->fullpath to: "/foo/ho/hum.txt"
pike-devel@lists.lysator.liu.se