Skip to content

Commit

Permalink
Update Program.fs
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGripe authored Sep 20, 2024
1 parent 4d39f67 commit 49a27ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ let addWhiteBorderAndReplace (inputFile: string) =

image.Dispose()

let tempFile = Path.GetTempFileName()
saveImage newImage tempFile format
File.Replace(tempFile, inputFile, null)
let tempFileName = Path.GetRandomFileName()
let tempFilePath = Path.Combine(Path.GetDirectoryName(inputFile), tempFileName)
saveImage newImage tempFilePath format
File.Replace(tempFilePath, inputFile, null)



Expand Down

0 comments on commit 49a27ae

Please sign in to comment.