diff --git a/dist/win/contrib/170FuseMigration.ps1 b/dist/win/contrib/170FuseMigration.ps1 new file mode 100644 index 000000000..203913ae7 --- /dev/null +++ b/dist/win/contrib/170FuseMigration.ps1 @@ -0,0 +1,12 @@ +$settingsPath = 'C:\Users\Arbeit\AppData\Roaming\Cryptomator-Dev\settings1617.json' +$settings = Get-Content -Path $settingsPath | ConvertFrom-Json +$atLeastOneCustomPath = $false; +foreach ($vault in $settings.directories){ + $atLeastOneCustomPath = $atLeastOneCustomPath -or ($vault.useCustomMountPath -eq "True") +} + +if( $atLeastOneCustomPath -and ($settings.preferredVolumeImpl -eq "FUSE")) { + Add-Member -Force -InputObject $settings -Name "mountService" -Value "org.cryptomator.frontend.fuse.mount.WinFspMountProvider" -MemberType NoteProperty + $newSettings = $settings | Select-Object * -ExcludeProperty "preferredVolumeImpl" + ConvertTo-Json $newSettings | Set-Content -Path $settingsPath +}