diff --git a/MSFS Layout Generator/Program.cs b/MSFS Layout Generator/Program.cs index 5b5a14e..153a46c 100644 --- a/MSFS Layout Generator/Program.cs +++ b/MSFS Layout Generator/Program.cs @@ -38,6 +38,13 @@ static void Main(string[] layoutPaths) { foreach (string file in Directory.GetFiles(Path.GetDirectoryName(layoutPath), "*.*", SearchOption.AllDirectories)) { + // Skip clearly temporary or backup files + if (file.EndsWith("~") + || file.StartsWith(".") + || file.EndsWith(".bak", StringComparison.CurrentCultureIgnoreCase) + || file.EndsWith(".tmp", StringComparison.CurrentCultureIgnoreCase)) + continue; + //Certain .NET APIs don't like long file paths, so we check to ensure the length is under the limit. if (file.Length > 259) {