jesseduffield / jesseduffield/lazygit

🐛The requested operation cannot be performed on a file with a user-mapped section open in v0.49.0

Open
#4,489 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**

I downloaded version `0.49.0` and now when launching `lazygit` I get the following error message

```
2025/04/16 10:10:44 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*fs.PathError open C:\Users\USERNAME\AppData\Local\lazygit\state.yml: The requested operation cannot be performed on a file with a user-mapped section open.
/home/runner/work/lazygit/lazygit/pkg/app/app.go:55 (0x10046df)
/home/runner/work/lazygit/lazygit/pkg/app/entry_point.go:168 (0x1006885)
/home/runner/work/lazygit/lazygit/main.go:23 (0x1007ad8)
/opt/hostedtoolcache/go/1.24.2/x64/src/internal/runtime/atomic/types.go:194 (0x7c679d)
/opt/hostedtoolcache/go/1.24.2/x64/src/runtime/asm_amd64.s:1700 (0x8019a1)
```

I can't see anything locking `state.yml`.

If I delete the `C:\Users\USERNAME\AppData\Local\lazygit` and start `lazygit` then it works but if I exit `lazygit` and then launch `lazygit` again I get the error again.

**To Reproduce**
Go into any git repo and launch `lazygit`

**Version info:**
_Run `lazygit --version` and paste the result here_

```
> lazygit -v
commit=5f809809dda06c98e51743ac8c19af6a26a5984b, build date=2025-04-14T08:30:35Z, build source=binaryRelease, version=0.49.0, os=windows, arch=amd64, git version=2.49.0.windows.1
```

_Run `git --version` and paste the result here_

```
> git --version
git version 2.49.0.windows.1
```

**Additional context**
This appears to only be an issue with `v0.49.0`. `v0.48.0` is working for me.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.