From 1a9da04f78ff40b4e81378db2cc006c4e5140ee5 Mon Sep 17 00:00:00 2001 From: Markus Hofknecht Date: Fri, 5 Aug 2022 22:19:55 +0200 Subject: [PATCH] [BUG] Fix Duplicate file/folder name causes unexpected result on opening (#434), version 1.3.0.15 --- DataClasses/RowData.cs | 2 +- Helpers/WindowsExplorerSort.cs | 1 - Properties/AssemblyInfo.cs | 4 ++-- UserInterface/AppNotifyIcon.cs | 1 - UserInterface/SettingsForm.cs | 1 - Utilities/File/IconReader.cs | 2 -- 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/DataClasses/RowData.cs b/DataClasses/RowData.cs index b4de9ec..06c9017 100644 --- a/DataClasses/RowData.cs +++ b/DataClasses/RowData.cs @@ -45,7 +45,7 @@ namespace SystemTrayMenu.DataClasses try { FileInfo = new FileInfo(path.Replace("\x00", string.Empty)); - Path = FileInfo.FullName; + Path = IsFolder ? $@"{FileInfo.FullName}\" : FileInfo.FullName; FileExtension = System.IO.Path.GetExtension(Path); IsLink = FileExtension.Equals(".lnk", StringComparison.InvariantCultureIgnoreCase); if (IsLink) diff --git a/Helpers/WindowsExplorerSort.cs b/Helpers/WindowsExplorerSort.cs index 97b110d..d340eca 100644 --- a/Helpers/WindowsExplorerSort.cs +++ b/Helpers/WindowsExplorerSort.cs @@ -5,7 +5,6 @@ namespace SystemTrayMenu.Helper { using System.Collections.Generic; - using System.IO; internal class WindowsExplorerSort : IComparer { diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 8e57128..657790f 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -39,5 +39,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("1.3.0.14")] -[assembly: AssemblyFileVersion("1.3.0.14")] +[assembly: AssemblyVersion("1.3.0.15")] +[assembly: AssemblyFileVersion("1.3.0.15")] diff --git a/UserInterface/AppNotifyIcon.cs b/UserInterface/AppNotifyIcon.cs index 28a4193..1f7d50e 100644 --- a/UserInterface/AppNotifyIcon.cs +++ b/UserInterface/AppNotifyIcon.cs @@ -8,7 +8,6 @@ namespace SystemTrayMenu.UserInterface using System.Windows.Forms; using SystemTrayMenu.Helper; using SystemTrayMenu.Utilities; - using Timer = System.Windows.Forms.Timer; internal class AppNotifyIcon : IDisposable { diff --git a/UserInterface/SettingsForm.cs b/UserInterface/SettingsForm.cs index 7b612e7..06cde06 100644 --- a/UserInterface/SettingsForm.cs +++ b/UserInterface/SettingsForm.cs @@ -7,7 +7,6 @@ namespace SystemTrayMenu.UserInterface using System; using System.Collections.Generic; using System.Drawing; - using System.Globalization; using System.IO; using System.Reflection; using System.Text; diff --git a/Utilities/File/IconReader.cs b/Utilities/File/IconReader.cs index 86cdbd4..07461fc 100644 --- a/Utilities/File/IconReader.cs +++ b/Utilities/File/IconReader.cs @@ -11,9 +11,7 @@ namespace SystemTrayMenu.Utilities using System.Drawing; using System.Drawing.Imaging; using System.IO; - using System.Linq; using System.Runtime.InteropServices; - using System.Text; using System.Threading; using SystemTrayMenu.DllImports;