From 1f615211db106be155ce2b8a62b2d6c18036f92b Mon Sep 17 00:00:00 2001 From: Scrub <72096833+ScrubN@users.noreply.github.com> Date: Wed, 28 Aug 2024 21:49:13 -0400 Subject: [PATCH] Fix application crash when enqueuing to an invalid destination folder (#1201) * Revert removing unused translations (from #1174) * Fix application crash when enqueuing to an invalid destination folder * Fix default enqueue folder only saving when the browser button was used * Inherit documentation from Directory.CreateDirectory * Thanks rider --- TwitchDownloaderCore/TwitchHelper.cs | 1 + .../Translations/Strings.Designer.cs | 18 +++ .../Translations/Strings.es.resx | 6 + .../Translations/Strings.fr.resx | 6 + .../Translations/Strings.it.resx | 6 + .../Translations/Strings.ja.resx | 6 + .../Translations/Strings.pl.resx | 6 + .../Translations/Strings.pt-br.resx | 6 + TwitchDownloaderWPF/Translations/Strings.resx | 6 + .../Translations/Strings.ru.resx | 6 + .../Translations/Strings.tr.resx | 6 + .../Translations/Strings.uk.resx | 6 + .../Translations/Strings.zh-cn.resx | 6 + TwitchDownloaderWPF/WindowQueueOptions.xaml | 2 +- .../WindowQueueOptions.xaml.cs | 107 ++++++++++++++++-- 15 files changed, 185 insertions(+), 9 deletions(-) diff --git a/TwitchDownloaderCore/TwitchHelper.cs b/TwitchDownloaderCore/TwitchHelper.cs index a5943c3b..71f9be56 100644 --- a/TwitchDownloaderCore/TwitchHelper.cs +++ b/TwitchDownloaderCore/TwitchHelper.cs @@ -927,6 +927,7 @@ public static void CleanUpClaimedFile([AllowNull] FileInfo fileInfo, [AllowNull] } } + /// public static DirectoryInfo CreateDirectory(string path) { DirectoryInfo directoryInfo = Directory.CreateDirectory(path); diff --git a/TwitchDownloaderWPF/Translations/Strings.Designer.cs b/TwitchDownloaderWPF/Translations/Strings.Designer.cs index 33119a62..c3138f44 100644 --- a/TwitchDownloaderWPF/Translations/Strings.Designer.cs +++ b/TwitchDownloaderWPF/Translations/Strings.Designer.cs @@ -1283,6 +1283,24 @@ public static string InvalidClipLinkIdMessage { } } + /// + /// Looks up a localized string similar to Invalid Folder Path. + /// + public static string InvalidFolderPath { + get { + return ResourceManager.GetString("InvalidFolderPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The folder does not exist. + /// + public static string InvalidFolderPathMessage { + get { + return ResourceManager.GetString("InvalidFolderPathMessage", resourceCulture); + } + } + /// /// Looks up a localized string similar to Invalid start or end time. /// diff --git a/TwitchDownloaderWPF/Translations/Strings.es.resx b/TwitchDownloaderWPF/Translations/Strings.es.resx index fbc7add9..eb354af6 100644 --- a/TwitchDownloaderWPF/Translations/Strings.es.resx +++ b/TwitchDownloaderWPF/Translations/Strings.es.resx @@ -672,6 +672,12 @@ ¿TwitchDownloaderWPF no está disponible en tu idioma? ¡Haz clic para saber cómo ayudar a traducir! + + Ruta de carpeta no válida + + + La carpeta no existe + Cancelado diff --git a/TwitchDownloaderWPF/Translations/Strings.fr.resx b/TwitchDownloaderWPF/Translations/Strings.fr.resx index 4d3e41a1..2861a1c1 100644 --- a/TwitchDownloaderWPF/Translations/Strings.fr.resx +++ b/TwitchDownloaderWPF/Translations/Strings.fr.resx @@ -672,6 +672,12 @@ TwitchDownloaderWPF n'est pas disponible dans votre langue maternelle ? Cliquez pour apprendre comment aider à traduire ! + + Chemin d'accès au répertoire non valide + + + Le répertoire n'existe pas + Annulé diff --git a/TwitchDownloaderWPF/Translations/Strings.it.resx b/TwitchDownloaderWPF/Translations/Strings.it.resx index ebd21332..df1ffa21 100644 --- a/TwitchDownloaderWPF/Translations/Strings.it.resx +++ b/TwitchDownloaderWPF/Translations/Strings.it.resx @@ -672,6 +672,12 @@ TwitchDownloaderWPF non è disponibile nella tua lingua? Fai click per sapere come aiutare o tradutte! + + Percorso della cartella non valido + + + La cartella non esiste + Cancellato diff --git a/TwitchDownloaderWPF/Translations/Strings.ja.resx b/TwitchDownloaderWPF/Translations/Strings.ja.resx index 986da9b5..1ad82b49 100644 --- a/TwitchDownloaderWPF/Translations/Strings.ja.resx +++ b/TwitchDownloaderWPF/Translations/Strings.ja.resx @@ -672,6 +672,12 @@ あなたの母国語でTwitchDownloaderWPFが利用できませんか?クリックで翻訳を手伝う方法を学ぶ! + + 不正なフォルダパス + + + フォルダが存在しません + キャンセルされた diff --git a/TwitchDownloaderWPF/Translations/Strings.pl.resx b/TwitchDownloaderWPF/Translations/Strings.pl.resx index ff2d6bb1..e3b04be3 100644 --- a/TwitchDownloaderWPF/Translations/Strings.pl.resx +++ b/TwitchDownloaderWPF/Translations/Strings.pl.resx @@ -672,6 +672,12 @@ TwitchDownloaderWPF nie jest dostępny w twoim natywnym języku? Kliknij, aby dowiedzieć się jak nas wspomóc! + + Nieprawidłowa Ścieżka Folderu + + + Folder nie istnieje + Anulowano diff --git a/TwitchDownloaderWPF/Translations/Strings.pt-br.resx b/TwitchDownloaderWPF/Translations/Strings.pt-br.resx index 761004d4..595285be 100644 --- a/TwitchDownloaderWPF/Translations/Strings.pt-br.resx +++ b/TwitchDownloaderWPF/Translations/Strings.pt-br.resx @@ -676,6 +676,12 @@ O TwitchDownloaderWPF não está disponível em sua languagem nativa? Clique para aprender como ajudar a traduzir! + + Diretório da Pasta Inválido + + + A pasta não existe + Cancelado diff --git a/TwitchDownloaderWPF/Translations/Strings.resx b/TwitchDownloaderWPF/Translations/Strings.resx index 20a48f4b..f92974c8 100644 --- a/TwitchDownloaderWPF/Translations/Strings.resx +++ b/TwitchDownloaderWPF/Translations/Strings.resx @@ -672,6 +672,12 @@ Is TwitchDownloaderWPF not available in your native language? Click to learn how to help translate! + + Invalid Folder Path + + + The folder does not exist + Canceled diff --git a/TwitchDownloaderWPF/Translations/Strings.ru.resx b/TwitchDownloaderWPF/Translations/Strings.ru.resx index c4b6ae16..07ae0e50 100644 --- a/TwitchDownloaderWPF/Translations/Strings.ru.resx +++ b/TwitchDownloaderWPF/Translations/Strings.ru.resx @@ -672,6 +672,12 @@ TwitchDownloaderWPF не доступен на твоем языке? Нажми здесь чтобы узнать как помочь с переводом! + + Неправильный путь к папке + + + Папка не существует + Отменено diff --git a/TwitchDownloaderWPF/Translations/Strings.tr.resx b/TwitchDownloaderWPF/Translations/Strings.tr.resx index d54f7a12..b4a31ed0 100644 --- a/TwitchDownloaderWPF/Translations/Strings.tr.resx +++ b/TwitchDownloaderWPF/Translations/Strings.tr.resx @@ -673,6 +673,12 @@ TwitchDownloaderWPF ana dilinizde mevcut değil mi? Çeviriye nasıl yardım edeceğinizi öğrenmek için tıklayın! + + Geçersiz Klasör Yolu + + + Klasör mevcut değil + İptal edildi diff --git a/TwitchDownloaderWPF/Translations/Strings.uk.resx b/TwitchDownloaderWPF/Translations/Strings.uk.resx index 68f46d76..74ef98e8 100644 --- a/TwitchDownloaderWPF/Translations/Strings.uk.resx +++ b/TwitchDownloaderWPF/Translations/Strings.uk.resx @@ -672,6 +672,12 @@ TwitchDownloaderWPF недоступно на вашій мові? Натисніть тут, щоб дізнатися, як допомогти з перекладом! + + Неправильний шлях до папки + + + Папка не існує + Скасовано diff --git a/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx b/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx index 3fd7adff..5e9a0afb 100644 --- a/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx +++ b/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx @@ -672,6 +672,12 @@ TwitchDownloaderWPF 没有你的母语版本?点击了解如何帮助翻译! + + 文件夹路径无效 + + + 文件夹不存在 + 已取消 diff --git a/TwitchDownloaderWPF/WindowQueueOptions.xaml b/TwitchDownloaderWPF/WindowQueueOptions.xaml index 154a73eb..5d32d3bd 100644 --- a/TwitchDownloaderWPF/WindowQueueOptions.xaml +++ b/TwitchDownloaderWPF/WindowQueueOptions.xaml @@ -30,7 +30,7 @@ - +