mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-22 03:00:14 +08:00
fix memory leak and set object to null when switching viewer target
This commit is contained in:
@@ -127,6 +127,9 @@ namespace QuickLook.Plugin.ArchiveViewer
|
||||
|
||||
private string[] GetPathFragments(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return new string[0];
|
||||
|
||||
var frags = path.Split('\\', '/').Where(f => !string.IsNullOrEmpty(f)).ToArray();
|
||||
|
||||
return frags.Select((s, i) => frags.Take(i + 1).Aggregate((a, b) => a + "\\" + b)).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user