[Hosts] Handle hidden hosts file (#34308)

* handle hidden hosts file

* don't remove hidden attribute
This commit is contained in:
Davide Giacometti
2024-08-16 20:36:26 +02:00
committed by GitHub
parent 1cbf512ed0
commit 9af757f5ce
4 changed files with 50 additions and 11 deletions

View File

@@ -283,7 +283,7 @@ namespace HostsUILib.ViewModels
[RelayCommand]
public void OverwriteHosts()
{
_hostsService.RemoveReadOnly();
_hostsService.RemoveReadOnlyAttribute();
_ = Task.Run(SaveAsync);
}