mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-16 05:12:39 +00:00
Try catch DMG exception
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
using DiscUtils;
|
using DiscUtils;
|
||||||
using DiscUtils.HfsPlus;
|
using DiscUtils.HfsPlus;
|
||||||
|
using QuickLook.Common.Helpers;
|
||||||
using QuickLook.Plugin.AppViewer.PackageParsers.Ipa;
|
using QuickLook.Plugin.AppViewer.PackageParsers.Ipa;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -35,7 +36,7 @@ public class DmgReader : IDisposable
|
|||||||
|
|
||||||
public Dictionary<string, DmgArchive> Archives { get; } = [];
|
public Dictionary<string, DmgArchive> Archives { get; } = [];
|
||||||
|
|
||||||
public Dictionary<string, object> InfoPlistDict { get; set; }
|
public Dictionary<string, object> InfoPlistDict { get; set; } = [];
|
||||||
|
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
|
|
||||||
@@ -90,6 +91,8 @@ public class DmgReader : IDisposable
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
// Find the first (and supposedly, only, HFS partition)
|
// Find the first (and supposedly, only, HFS partition)
|
||||||
foreach (var volume in VolumeManager.GetPhysicalVolumes(disk))
|
foreach (var volume in VolumeManager.GetPhysicalVolumes(disk))
|
||||||
{
|
{
|
||||||
@@ -123,6 +126,11 @@ public class DmgReader : IDisposable
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
ProcessHelper.WriteLog(e.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
if (InfoPlistDict.TryGetValue("CFBundleDisplayName", out object value) && value is string stringValue)
|
if (InfoPlistDict.TryGetValue("CFBundleDisplayName", out object value) && value is string stringValue)
|
||||||
|
Reference in New Issue
Block a user