diff options
| -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() |
