mbl-35 / wslctl

Provide a single command wslctl to create, backup and manage WSL (Windows Subsystem for Linux) instances on a windows host
0 stars 1 forks source link

[BUG] registry update broke registry file #6

Closed mbl-35 closed 2 years ago

mbl-35 commented 2 years ago

When following command :

wslctl registry update

and the file already exists in the user %LOCALAPPDATA%/Wslctl/Registry/register.json, its content is not correctly copied from remote.

v-2.0.4

mbl-35 commented 2 years ago

We use OpenWrite method in FileUtils.psm1. As said at file-openwrite-appends-instead-of-wiping-contents, the file is not truncated when it exists.

Then :