about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorBarosl Lee <vcs@barosl.com>2014-11-11 14:38:20 +0900
committerBarosl Lee <vcs@barosl.com>2014-11-19 05:31:45 +0900
commit6f422c4c05f4d108ba6429a174aa0c2ef3b183fa (patch)
treeb393a680897f0d6a80b96f1fda5c6fcb636f8cc5 /src/libstd/sys/unix/stack_overflow.rs
parent09e2ad13d0aa01143bcb20dece3ff6c5a7e34ea3 (diff)
downloadrust-6f422c4c05f4d108ba6429a174aa0c2ef3b183fa.tar.gz
rust-6f422c4c05f4d108ba6429a174aa0c2ef3b183fa.zip
Make os::getcwd() return IoResult<Path>
os::getcwd() panics if the current directory is not available. According
to getcwd(3), there are three cases:

- EACCES: Permission denied.
- ENOENT: The current working directory has been removed.
- ERANGE: The buffer size is less than the actual absolute path.

This commit makes os::getcwd() return IoResult<Path>, not just Path,
preventing it from panicking.

As os::make_absolute() depends on os::getcwd(), it is also modified to
return IoResult<Path>.

Fixes #16946.

[breaking-change]
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions