# fs: Fall back from atomic write to regular fs write when file handle is in use on Windows \(\#30222\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/fcf066aff5eb44802865b532a1163b495916304a)

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

Visibility: public

Requested revision: fcf066aff5eb44802865b532a1163b495916304a

Requested commit: fcf066aff5eb44802865b532a1163b495916304a

Commit: fcf066aff5eb44802865b532a1163b495916304a

Tree: 679792fc57d4d5f272f4cc0252568bb476d3375c

Author: Smit Barmase

Committer: GitHub

## Message

```
fs: Fall back from atomic write to regular fs write when file handle is in use on Windows (#30222)

Closes #30054

For reference, another way to work around this is to drop the file
handle which we can't do in this case, as it would require reopening the
settings.json worktree, which is a rather unpleasant fix.

Another approach might be to open the file handle with some special
flags, but I couldn't get that to work at the time of writing.

Release Notes:

- Fixed "Backup and Update" in settings migration not working on
Windows.
```

## Parents

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

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