Skip to content

Commit

Permalink
Fix missing file extension on Samsung
Browse files Browse the repository at this point in the history
  • Loading branch information
tmk907 committed Sep 10, 2022
1 parent 548b2bd commit be0f0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AndroidYouTubeDownloader/Services/DownloadService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private async Task CopyToTargetFile(string tempFilePath, IStreamInfo stream, Vid
if (fileNameSuffix == $"({max})") throw new Exception("File with same name exists");

var audioFile = await downloadsFolder
.CreateFileAsync($"{fileName}{fileNameSuffix}", mimeType).ConfigureAwait(false);
.CreateFileAsync($"{fileName}{fileNameSuffix}.{extension}", mimeType).ConfigureAwait(false);
using var inputFile = new FileStream(tempFilePath, FileMode.Open, FileAccess.Read);
using var outputFile = await audioFile.OpenStreamAsync(FileAccess.Write);
await inputFile.CopyToAsync(outputFile).ConfigureAwait(false);
Expand Down

0 comments on commit be0f0da

Please sign in to comment.