summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs')
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs6
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())
{