# std.fs.path.resolve: eliminate getcwd\(\) syscall · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d24aaf8847336e12b6571e13d57f6d112452d97d)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d24aaf8847336e12b6571e13d57f6d112452d97d

Requested commit: d24aaf8847336e12b6571e13d57f6d112452d97d

Commit: d24aaf8847336e12b6571e13d57f6d112452d97d

Tree: a806cdf1d5dc112af321ff54041a4f7f9a247020

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.fs.path.resolve: eliminate getcwd() syscall

This is a breaking change to the API. Instead of the first path
implicitly being the current working directory, it now asserts that the
number of paths passed is greater than zero.

Importantly, it never calls getcwd(); instead, it can possibly return
".", or a series of "../". This changes the error set to only be
`error{OutOfMemory}`.

closes #13613

```

## Parents

- [21bd13626d66c36c327bb317bd09cad979d92327](https://git.cafe/gitcafe/zig/commit/21bd13626d66c36c327bb317bd09cad979d92327?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d24aaf8847336e12b6571e13d57f6d112452d97d?format=markdown)
