Skip to content

Commit

Permalink
Fix bugs in build logic
Browse files Browse the repository at this point in the history
Uncovered these while testing.
  • Loading branch information
joyfullservice committed Nov 8, 2023
1 parent 8f1649a commit 4f9247d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Version Control.accda.src/modules/clsDevMode.cls
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Public Sub LoadFromExportFile(strFileContent As String)
' Clear existing structures and create block classes.
ClearStructures

If Not Len(strFileContent) Then Exit Sub
If Len(strFileContent) = 0 Then Exit Sub

' Read the text file line by line, loading the block data
Perf.OperationStart "Read File DevMode"
Expand Down
4 changes: 2 additions & 2 deletions Version Control.accda.src/modules/clsSourceParser.cls
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Public Sub MergeVBA(strVbaCode As String)
Dim lngLine As Long

' Make sure we have some output
If Not Len(this.strOutput) Then this.strOutput = this.strInput
If Len(this.strOutput) = 0 Then this.strOutput = this.strInput

' Rebuild output using provided VBA code
With New clsConcat
Expand Down Expand Up @@ -182,7 +182,7 @@ Public Sub MergePrintSettings(strJson As String)
Dim dSettings As Dictionary

' Make sure we have some output
If Not Len(this.strOutput) Then this.strOutput = this.strInput
If Len(this.strOutput) = 0 Then this.strOutput = this.strInput

' Don't try to parse an empty string
If strJson = vbNullString Then Exit Sub
Expand Down
6 changes: 4 additions & 2 deletions Version Control.accda.src/modules/modVCSUtility.bas
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,10 @@ Public Sub LoadComponentFromText(intType As AcObjectType, strName As String, str
Perf.OperationEnd
End If

' Clean up any temp file
If FSO.FileExists(strSourceFile) Then DeleteFile strSourceFile
' Clean up any additional temp file used in the building process
If strFile <> strSourceFile Then
If FSO.FileExists(strSourceFile) Then DeleteFile strSourceFile
End If

' Check for VBA overlay
If blnVbaOverlay Then OverlayCodeModule strName, SwapExtension(strFile, "cls")
Expand Down

0 comments on commit 4f9247d

Please sign in to comment.