Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
URUWorks committed Feb 27, 2024
1 parent ca3abef commit 78c971b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion TeroSubtitler/common/UWSystem.InetUtils.pas
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,17 @@ procedure TDownload.Execute;
DS: TDownloadStream;
Flags: Word;
Success: Boolean;
Dir: String;
begin
FStartTime := GetTickCount64;
if GetContentLength then

Dir := ExtractFileDir(FLocalFile);
if not DirectoryExists(Dir) and not CreateDir(Dir) then
begin
FErrMsg := '-1';
Synchronize(@DoOnDownloadError);
end
else if GetContentLength then
begin
Flags := fmOpenWrite;
Success := False;
Expand Down

0 comments on commit 78c971b

Please sign in to comment.