Skip to content

Commit

Permalink
Ensure the updater doesn't delete hidden or system files (Ryujinx#4626)
Browse files Browse the repository at this point in the history
* Copy desktop.ini to update directory if it exists in HomeDir

* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
  • Loading branch information
SpadVN committed Apr 16, 2023
1 parent d5e4378 commit baf8752
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Ryujinx.Ava/Modules/Updater/Updater.cs
Expand Up @@ -730,7 +730,7 @@ private static IEnumerable<string> EnumerateFilesToDelete()
}
}

return files;
return files.Where(f => !new FileInfo(f).Attributes.HasFlag(FileAttributes.Hidden | FileAttributes.System));
}

private static void MoveAllFilesOver(string root, string dest, TaskDialog taskDialog)
Expand Down
2 changes: 1 addition & 1 deletion Ryujinx/Modules/Updater/Updater.cs
Expand Up @@ -577,7 +577,7 @@ private static IEnumerable<string> EnumerateFilesToDelete()
}
}

return files;
return files.Where(f => !new FileInfo(f).Attributes.HasFlag(FileAttributes.Hidden | FileAttributes.System));
}

private static void MoveAllFilesOver(string root, string dest, UpdateDialog dialog)
Expand Down

0 comments on commit baf8752

Please sign in to comment.