From 8c28f0c6e32a018a92fbe37a991cf00ace723fc9 Mon Sep 17 00:00:00 2001 From: Jacob Keller Date: Tue, 11 Apr 2023 20:47:40 -0700 Subject: [PATCH] Ignore hidden files when generating the unused files list. Don't include hidden files in the unused file list for a mod. These files are typically things such as .git or otherwise intended to be hidden and shouldn't be included as part of the list of files which could be used. --- Penumbra/Mods/Mod.Files.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Penumbra/Mods/Mod.Files.cs b/Penumbra/Mods/Mod.Files.cs index a12b29fc..444f1fa9 100644 --- a/Penumbra/Mods/Mod.Files.cs +++ b/Penumbra/Mods/Mod.Files.cs @@ -65,6 +65,7 @@ public partial class Mod var modFiles = AllFiles.ToHashSet(); return ModPath.EnumerateDirectories() .SelectMany( f => f.EnumerateFiles( "*", SearchOption.AllDirectories ) ) + .Where( f => !f.Attributes.HasFlag( FileAttributes.Hidden ) ) .Select( f => new FullPath( f ) ) .Where( f => !modFiles.Contains( f ) ) .ToList(); @@ -142,4 +143,4 @@ public partial class Mod IModGroup.Save( group, ModPath, index ); } } -} \ No newline at end of file +}