mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Fix for finding img files in SatBoxPng
This commit is contained in:
parent
41cccb9863
commit
f5dd12a1c0
@ -38,7 +38,15 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
try
|
||||
{
|
||||
if (path != null && File.Exists(Path.Combine(path, text)))
|
||||
{
|
||||
text = Path.Combine(path, text);
|
||||
}
|
||||
else if (path != null)
|
||||
{
|
||||
int indexOfSlash = text.LastIndexOf("/", StringComparison.Ordinal);
|
||||
if (indexOfSlash >= 0 && File.Exists(Path.Combine(path, text.Remove(0, indexOfSlash + 1))))
|
||||
text = Path.Combine(path, text.Remove(0, indexOfSlash + 1));
|
||||
}
|
||||
p = new Paragraph(DecodeTimeCode(start), DecodeTimeCode(end), text);
|
||||
subtitle.Paragraphs.Add(p);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user