diff options
| author | Barosl Lee <vcs@barosl.com> | 2014-11-11 14:38:20 +0900 |
|---|---|---|
| committer | Barosl Lee <vcs@barosl.com> | 2014-11-19 05:31:45 +0900 |
| commit | 6f422c4c05f4d108ba6429a174aa0c2ef3b183fa (patch) | |
| tree | b393a680897f0d6a80b96f1fda5c6fcb636f8cc5 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 09e2ad13d0aa01143bcb20dece3ff6c5a7e34ea3 (diff) | |
| download | rust-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
