Skip to content

Commit

Permalink
Clear file attributes before deleting if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Jun 22, 2024
1 parent ab45e73 commit 5762f6c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Tkmm.Core/Config.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using CommunityToolkit.Mvvm.ComponentModel;
using ConfigFactory.Core;
using ConfigFactory.Core.Attributes;
using Tkmm.Core.Helpers.Operations;

namespace Tkmm.Core;

Expand Down Expand Up @@ -111,6 +112,7 @@ partial void OnThemeChanged(string value)
partial void OnUseRyujinxChanged(bool value)
{
if (Directory.Exists(_ryujinxPath)) {
DirectoryOperations.ClearAttributes(_ryujinxPath);
Directory.Delete(_ryujinxPath, true);
}

Expand All @@ -129,6 +131,7 @@ partial void OnUseJapaneseCitrusFruitChanged(bool value)
string japaneseCitrusFruitPath = Path.Combine(ReadJapaneseCitrusFruitLoadPath(), "0100F2C0115B6000", "TKMM");

if (Directory.Exists(japaneseCitrusFruitPath)) {
DirectoryOperations.ClearAttributes(japaneseCitrusFruitPath);
Directory.Delete(japaneseCitrusFruitPath, true);
}

Expand Down

0 comments on commit 5762f6c

Please sign in to comment.