Skip to content

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

Open
@kimsagro1

Description

@kimsagro1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions