diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index bf2966b..7cb380a 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.2.19")] -[assembly: AssemblyFileVersion("0.9.2.19")] +[assembly: AssemblyVersion("0.9.2.20")] +[assembly: AssemblyFileVersion("0.9.2.20")] diff --git a/Utilities/FolderOptions.cs b/Utilities/FolderOptions.cs index 26afc4c..5872ee1 100644 --- a/Utilities/FolderOptions.cs +++ b/Utilities/FolderOptions.cs @@ -56,15 +56,18 @@ namespace SystemTrayMenu.Utilities internal static bool IsHidden(string path, ref bool hiddenEntry) { bool isDirectoryToHide = false; - - FileAttributes attributes = File.GetAttributes(path); - hiddenEntry = attributes.HasFlag(FileAttributes.Hidden); - bool systemEntry = attributes.HasFlag( - FileAttributes.Hidden | FileAttributes.System); - if ((hideHiddenEntries && hiddenEntry) || - (hideSystemEntries && systemEntry)) +#warning #80 + if (path.Length < 260) { - isDirectoryToHide = true; + FileAttributes attributes = File.GetAttributes(path); + hiddenEntry = attributes.HasFlag(FileAttributes.Hidden); + bool systemEntry = attributes.HasFlag( + FileAttributes.Hidden | FileAttributes.System); + if ((hideHiddenEntries && hiddenEntry) || + (hideSystemEntries && systemEntry)) + { + isDirectoryToHide = true; + } } return isDirectoryToHide; diff --git a/Utilities/Log.cs b/Utilities/Log.cs index 6433918..f02a35d 100644 --- a/Utilities/Log.cs +++ b/Utilities/Log.cs @@ -23,8 +23,7 @@ namespace SystemTrayMenu.Utilities internal static void Warn(string message, Exception ex) { - log.Warn($"{message}{Environment.NewLine}" + - $"{ex.ToString()}"); + log.Warn($"{message}{Environment.NewLine}{ex}"); } //internal static void Debug(string message)