$ cd /home/user/dirfs
$ mkdir dirA
$ go run main.go
What did you see?
I saw exactly what I expected, but it could be something that may surprise some users.
2021/07/15 15:02:04 from "/home/user/dirfs/dirA": open dirA/file: no such file or directory
exit status 1
Given that the DirFS was handed a relative path, it's entirely reasonable for reads subsequent to a chdir to be now relative to the new working directory, but it may be worth clarifying that the DirFS does not hold an absolute path as its root unless it was handed one or some other way to indicate that chdir will alter the effective filesystem that's seen.
The text was updated successfully, but these errors were encountered: