From 8a382eaacdaffe08c722bd42f6747a444485d919 Mon Sep 17 00:00:00 2001 From: Markus Hofknecht Date: Fri, 25 Aug 2023 11:55:55 +0200 Subject: [PATCH] [BUG] Fix fast renames causes duplicated item (#497), version 1.3.2.7 --- Business/Menus.cs | 6 +- README.md | 3 +- UserInterface/AppContextMenu.cs | 102 +++++++++++++++++++++++--------- 3 files changed, 78 insertions(+), 33 deletions(-) diff --git a/Business/Menus.cs b/Business/Menus.cs index 139d49e..3756aff 100644 --- a/Business/Menus.cs +++ b/Business/Menus.cs @@ -686,9 +686,7 @@ namespace SystemTrayMenu.Business if (rowData.Path.StartsWith($"{e.OldFullPath}")) { string path = rowData.Path.Replace(e.OldFullPath, e.FullPath); - FileAttributes attr = File.GetAttributes(path); - bool isFolder = (attr & FileAttributes.Directory) == FileAttributes.Directory; - if (isFolder) + if (rowData.IsFolder) { string? dirpath = Path.GetDirectoryName(path); if (string.IsNullOrEmpty(dirpath)) @@ -699,7 +697,7 @@ namespace SystemTrayMenu.Business path = dirpath; } - RowData rowDataRenamed = new(isFolder, rowData.IsAdditionalItem, 0, path); + RowData rowDataRenamed = new(rowData.IsFolder, rowData.IsAdditionalItem, 0, path); FolderOptions.ReadHiddenAttributes(rowDataRenamed.Path, out bool hasHiddenFlag, out bool isDirectoryToHide); if (isDirectoryToHide) { diff --git a/README.md b/README.md index 2e673a1..13ff448 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,8 @@ Thanks for ideas, reporting issues and contributing! #463 #494 Dirk S., #466 [Dean-Corso](https://github.com/Dean-Corso), #488 [DailenG](https://github.com/DailenG), -#490 [TrampiPW](https://github.com/TrampiPW) +#490 [TrampiPW](https://github.com/TrampiPW), +#497 Aziz Donations diff --git a/UserInterface/AppContextMenu.cs b/UserInterface/AppContextMenu.cs index 09653cc..2042491 100644 --- a/UserInterface/AppContextMenu.cs +++ b/UserInterface/AppContextMenu.cs @@ -93,34 +93,80 @@ namespace SystemTrayMenu.UserInterface moreInfo += "(Version 3, 29 June 2007)" + Environment.NewLine; moreInfo += "Thanks for ideas, reporting issues and contributing!" + Environment.NewLine; - moreInfo += "#123 Mordecai00, #125 Holgermh, #135 #153 #154 #164 jakkaas, #145 Pascal Aloy, #153 #158 #160 blackcrack,"; - moreInfo += "#162 HansieNL, #163 igorruckert, #171 kehoen, #186 Dtrieb, #188 #189 #191 #195 iJahangard, #195 #197 #225 #238 the-phuctran, "; - moreInfo += "#205 kristofzerbe, #209 jonaskohl, #211 blacksparrow15, #220 #403 Yavuz E., #229 #230 #239 Peter O., #231 Ryonez, "; - moreInfo += "#235 #242 243 #247, #271 Tom, #237 Torsten S., #240 video Patrick, #244 Gunter D., #246 #329 MACE4GITHUB, #259 #310 vanjac, "; - moreInfo += "#262 terencemcdonnell, #269 petersnows25, #272 Peter M., #273 #274 ParasiteDelta, #275 #276 #278 donaldaken, "; - moreInfo += "#277 Jan S., #282 akuznets, #283 #284 #289 RuSieg, #285 #286 dao-net, #288 William P., #294 #295 #296 Stefan Mahrer, "; - moreInfo += "#225 #297 #299 #317 #321 #324 #330 #386 #390 #401 #402 #407 #409 #414 #416 #418 #428 #430 #443 chip33, "; - moreInfo += "#298 phanirithvij, #306 wini2, #370 dna5589, #372 not-nef, #376 Michelle H., "; - moreInfo += "#377 SoenkeHob, #380 #394 TransLucida, #384 #434 #435 boydfields, #386 visusys, #387 #411 #444 yrctw" + Environment.NewLine; - moreInfo += "#446 timinformatica, #450 ppt-oldoerp, #453 fubaWoW, #454 WouterVanGoey" + Environment.NewLine; - moreInfo += "#462 verdammt89x, #463 Dirk S., #466 Dean-Corso, #488 DailenG, #490 TrampiPW" + Environment.NewLine; - moreInfo += @" -Sponsors - Thank you! ------------------- -* Stefan Mahrer -* boydfields -* RuSieg -* igor-davidov -* Ralf K. -* Tim K. -* Georg W. -* donaldaken -* Marc Speer -* Cito -* Peter G. -* Traditional_Tap3954 -* Maximilian H. -"; + moreInfo += + "#123 Mordecai00, " + + "#125 Holgermh, " + + "#135 #153 #154 #164 jakkaas, " + + "#145 Pascal Aloy, " + + "#153 #158 #160 blackcrack, " + + "#162 HansieNL, " + + "#163 igorruckert, " + + "#171 kehoen, " + + "#186 Dtrieb, " + + "#188 #189 #191 #195 iJahangard, " + + "#195 #197 #225 #238 the-phuctran, " + + "#205 kristofzerbe, " + + "#209 jonaskohl, " + + "#211 blacksparrow15, " + + "#220 #403 Yavuz E., " + + "#229 #230 #239 Peter O., " + + "#231 Ryonez, " + + "#235 #242 243 #247, #271 Tom, " + + "#237 Torsten S., " + + "#240 video Patrick, " + + "#244 Gunter D., " + + "#246 #329 MACE4GITHUB, " + + "#259 #310 vanjac, " + + "#262 terencemcdonnell, " + + "#269 petersnows25, " + + "#272 Peter M., " + + "#273 #274 ParasiteDelta, " + + "#275 #276 #278 donaldaken, " + + "#277 Jan S., " + + "#282 akuznets, " + + "#283 #284 #289 RuSieg, " + + "#285 #286 dao-net, " + + "#288 William P., " + + "#294 #295 #296 Stefan Mahrer, " + + "#225 #297 #299 #317 #321 #324 #330 #386 #390 #401 #402 #407 #409 #414 #416 #418 #428 #430 #443 chip33, " + + "#298 phanirithvij, " + + "#306 wini2, " + + "#370 dna5589, " + + "#372 not-nef, " + + "#376 Michelle H., " + + "#377 SoenkeHob, " + + "#380 #394 TransLucida, " + + "#384 #434 #435 boydfields, " + + "#386 visusys, " + + "#387 #411 #444 yrctw, " + + "#446 timinformatica, " + + "#450 ppt-oldoerp, " + + "#453 fubaWoW, " + + "#454 WouterVanGoey, " + + "#462 verdammt89x, " + + "#463 Dirk S., " + + "#466 Dean-Corso, " + + "#488 DailenG, " + + "#490 TrampiPW, " + + "#497 Aziz, " + + Environment.NewLine + + Environment.NewLine; + moreInfo += "Sponsors - Thank you!" + Environment.NewLine; + moreInfo += + "Stefan Mahrer, " + + "boydfields, " + + "RuSieg, " + + "igor-davidov, " + + "Ralf K., " + + "Tim K., " + + "Georg W., " + + "donaldaken, " + + "Marc Speer, " + + "Cito, " + + "Peter G., " + + "Traditional_Tap3954, " + + "Maximilian H., " + + Environment.NewLine; AboutBox aboutBox = new() { AppTitle = productName,