diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-27 22:08:00 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-27 22:08:00 -0400 |
commit | 88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac (patch) | |
tree | 5ce2a537117a883d661434a75c62efe6c07b75d1 /src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs | |
parent | 8231d05a33d8783093dd993cbe004239039fe8e8 (diff) | |
download | SMAPI-88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac.tar.gz SMAPI-88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac.tar.bz2 SMAPI-88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac.zip |
add support for ignored mod folders
Diffstat (limited to 'src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs')
-rw-r--r-- | src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs index 2c23a3ce..106c294f 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs @@ -102,8 +102,12 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning /// <param name="folder">The folder to search for mods.</param> public IEnumerable<ModFolder> GetModFolders(DirectoryInfo root, DirectoryInfo folder) { + // skip + if (folder.FullName != root.FullName && folder.Name.StartsWith(".")) + yield return new ModFolder(root, folder, null, "ignored folder because its name starts with a dot.", shouldBeLoaded: false); + // recurse into subfolders - if (this.IsModSearchFolder(root, folder)) + else if (this.IsModSearchFolder(root, folder)) { foreach (DirectoryInfo subfolder in folder.EnumerateDirectories()) { |