mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Add some retry when batch writing files
This commit is contained in:
parent
166a56f7f7
commit
aca715115f
@ -1383,7 +1383,24 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert
|
||||
sub.Header = AdvancedSubStationAlpha.AddTagToHeader("PlayResY", "PlayResY: " + resolution.Value.Y.ToString(CultureInfo.InvariantCulture), "[Script Info]", sub.Header);
|
||||
}
|
||||
|
||||
FileUtil.WriteAllText(outputFileName, sub.ToText(sf), targetEncoding);
|
||||
try
|
||||
{
|
||||
FileUtil.WriteAllText(outputFileName, sub.ToText(sf), targetEncoding);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
try
|
||||
{
|
||||
FileUtil.WriteAllText(outputFileName, sub.ToText(sf), targetEncoding);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
FileUtil.WriteAllText(outputFileName, sub.ToText(sf), targetEncoding);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
Reference in New Issue
Block a user