# Added os check for std.fs.setAsCwd\(\) to work with windows · gitcafe/zig

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

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

Visibility: public

Requested revision: ae39e7867db8053cd0538da10e144bf86bce4eba

Requested commit: ae39e7867db8053cd0538da10e144bf86bce4eba

Commit: ae39e7867db8053cd0538da10e144bf86bce4eba

Tree: 9be029846cd6af428dc6d5dabec4b113ec70cc5b

Author: xEgoist

Committer: Andrew Kelley

## Message

```
Added os check for std.fs.setAsCwd() to work with windows

Due to the unavailability of fchdir in Windows, a call for setting the
CWD needs to either call chdir with the path string or call
SetCurrentDirectory.
Either way, since we are dealing with a Handle in Windows, a call for
GetFinalPathNameByHandle is necessary for getting the file path first.

```

## Parents

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

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