mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Create missing directories for dictionary files
Updated InterjectionsRepository to check if the dictionary directory exists before attempting to save files. If the directory does not exist, it will now be created automatically. This change prevents potential errors during file saving operations. Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
This commit is contained in:
parent
a6bc467dab
commit
1a38183344
@ -87,6 +87,11 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
}
|
||||
}
|
||||
|
||||
if (!Directory.Exists(Configuration.DictionariesDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(Configuration.DictionariesDirectory);
|
||||
}
|
||||
|
||||
var fullFileName = Path.Combine(Configuration.DictionariesDirectory, userFileName);
|
||||
xmlDocument.Save(fullFileName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user