Describe the bug
Cannot load status db when filesystem is readonly
vcpkg list
error writing file: C:\vcpkg\installed\vcpkg\status-new: The data is invalid.
Environment
- OS: Windows 10 x64
- Compiler: MSVC 2019
To Reproduce
Steps to reproduce the behavior:
- Perform vcpkg operation in a writable filesystem
- vcpkg install zlib
- Make filesystem readonly (you may also deny NTFS write permission)
- vcpkg list
- Error occur
Expected behavior
No error.
zlib:x64-windows 1.2.11-6 A compression library
Additional context
If C:\vcpkg\installed\vcpkg\status is written immediately before vcpkg install exits, instead of lazy write on subsequent load, it won't fail on a readonly filesystem.
vcpkg update and vcpkg upgrade also fail.
If you run vcpkg list once then make readonly, subsequent vcpkg list will succeed.
Describe the bug
Cannot load status db when filesystem is readonly
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error.
zlib:x64-windows 1.2.11-6 A compression libraryAdditional context
If
C:\vcpkg\installed\vcpkg\statusis written immediately beforevcpkg installexits, instead of lazy write on subsequent load, it won't fail on a readonly filesystem.vcpkg updateandvcpkg upgradealso fail.If you run
vcpkg listonce then make readonly, subsequentvcpkg listwill succeed.