Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a799fd

Browse files
committed
Ensure the replay file is written if the directory already exists
1 parentadb4d75 commit9a799fd

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

‎src/DownloadLib.Shared/DownloadHelpers.cs‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -511,15 +511,16 @@ await Task.WhenAll(
511511
if(!Directory.Exists(OutputFolder))
512512
{
513513
_=Directory.CreateDirectory(OutputFolder);
514+
}
514515

515-
stringtmpname=update.Xml.LocalizedProperties.Title+" ("+MachineType.ToString()+").uupmcreplay";
516-
illegalCharacters=newRegex(@"[\\/:*?""<>|]");
517-
tmpname=illegalCharacters.Replace(tmpname,"");
518-
stringfilename=Path.Combine(OutputFolder,tmpname);
519-
if(WriteMetadata&&!File.Exists(filename))
520-
{
521-
File.WriteAllText(filename,JsonSerializer.Serialize(update,newJsonSerializerOptions(){WriteIndented=true,IncludeFields=true}));
522-
}
516+
stringtmpname=update.Xml.LocalizedProperties.Title+" ("+MachineType.ToString()+").uupmcreplay";
517+
illegalCharacters=newRegex(@"[\\/:*?""<>|]");
518+
tmpname=illegalCharacters.Replace(tmpname,"");
519+
stringfilename=Path.Combine(OutputFolder,tmpname);
520+
521+
if(WriteMetadata&&!File.Exists(filename))
522+
{
523+
File.WriteAllText(filename,JsonSerializer.Serialize(update,newJsonSerializerOptions(){WriteIndented=true,IncludeFields=true}));
523524
}
524525

525526
usingHttpDownloaderhelperDl=new(OutputFolder,downloadThreads);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp