diff options
| author | ac79b0c6 <[email protected]> | 2022-06-26 17:29:31 +0800 |
|---|---|---|
| committer | ac79b0c6 <[email protected]> | 2022-06-26 17:29:31 +0800 |
| commit | 94de4aca61a37f2a93354fd126712ad8bc8cd210 (patch) | |
| tree | cc4dabc3f0eb66e87924451637a20d951879bc84 | |
| parent | a0d392ff4fedf35281349e6c2209091b7e3d2116 (diff) | |
update mkvtool-gui:fix bug
| -rw-r--r-- | mkvtool-gui/MainWindow.axaml.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mkvtool-gui/MainWindow.axaml.cs b/mkvtool-gui/MainWindow.axaml.cs index 40b340f..4512bab 100644 --- a/mkvtool-gui/MainWindow.axaml.cs +++ b/mkvtool-gui/MainWindow.axaml.cs @@ -69,7 +69,7 @@ namespace mkvtool }).Start(); } } - + void lcb(mkvlib.LogLevel l, string str) { lcb(str); @@ -629,8 +629,14 @@ namespace mkvtool string cache = Path.Join(Environment.GetEnvironmentVariable(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME"), ".mkvtool", "caches"); void Cache() { - string[] ccs = Directory.GetFiles(cache, "*.cache"); - mkvlib.Cache(ccs); + try + { + if (!Directory.Exists(cache)) + Directory.CreateDirectory(cache); + string[] ccs = Directory.GetFiles(cache, "*.cache"); + mkvlib.Cache(ccs); + } + catch { } } void SaveSettings() |
