Skip to content

Commit

Permalink
Fix incomplete patches
Browse files Browse the repository at this point in the history
  • Loading branch information
evandixon committed Dec 25, 2017
1 parent bae4b8c commit 7e5f3f4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions DS ROM Patcher/NDSand3DSCore.vb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ ShowFormatDialog: Dim formatDialog As New ThreeDSFormatSelector
'- Build
Select Case outputFormat
Case DSFormat.Luma
If Directory.Exists(destinationPath) Then
Directory.Delete(destinationPath, True)
End If
Directory.CreateDirectory(destinationPath)

Dim titleId = Await DotNet3dsToolkit.MetadataReader.GetGameID(SelectedFilename)
Dim baseTargetPath = Path.Combine(destinationPath, "luma", "titles", titleId)
For Each file In filesModified
Expand All @@ -119,10 +124,9 @@ ShowFormatDialog: Dim formatDialog As New ThreeDSFormatSelector
'Create directory if it doesn't exist
Dim destDir = Path.GetDirectoryName(destFile)

If Directory.Exists(destDir) Then
Directory.Delete(destDir, True)
If Not Directory.Exists(destDir) Then
Directory.CreateDirectory(destDir)
End If
Directory.CreateDirectory(destDir)

IO.File.Copy(sourceFile, destFile)
Next
Expand Down

0 comments on commit 7e5f3f4

Please sign in to comment.