Преглед на файлове

Ensure the updater doesn't delete hidden or system files (#4626)

* Copy desktop.ini to update directory if it exists in HomeDir

* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
Vincenzo Nizza преди 3 години
родител
ревизия
baf8752e74
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      Ryujinx.Ava/Modules/Updater/Updater.cs
  2. 1 1
      Ryujinx/Modules/Updater/Updater.cs

+ 1 - 1
Ryujinx.Ava/Modules/Updater/Updater.cs

@@ -730,7 +730,7 @@ namespace Ryujinx.Modules
                 }
             }
 
-            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)

+ 1 - 1
Ryujinx/Modules/Updater/Updater.cs

@@ -577,7 +577,7 @@ namespace Ryujinx.Modules
                 }
             }
 
-            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)