Skip to content

Commit

Permalink
Fix issue with orphaned file detection
Browse files Browse the repository at this point in the history
Need to pass a dictionary, not a collection to the CompareToIndex function.
  • Loading branch information
joyfullservice committed Dec 15, 2023
1 parent e5f6c32 commit 89b5406
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Version Control.accda.src/modules/modOrphaned.bas
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ Public Sub ClearOrphanedSourceFiles(cType As IDbComponent)
If cType.SingleFile Then Exit For
Next varKey

' Build dictionary of included extensions
For Each varExt In cType.FileExtensions
dExtensions.Add varExt, vbNullString
Next varExt

' Check for single-file exports with no items
If cType.SingleFile Then
If dItems.Count = 0 Then
' No more of these items exist in the database.
' (For example, IMEX specs)
If FSO.FileExists(cType.SourceFile) Then
' Compare to index to check for any source changes.
CompareToIndex cType, cType.SourceFile, cType.FileExtensions, dBaseNames
CompareToIndex cType, cType.SourceFile, dExtensions, dBaseNames
End If
End If
Else
' Build dictionary of included extensions
For Each varExt In cType.FileExtensions
dExtensions.Add varExt, vbNullString
Next varExt

' Loop through files in folder
Set oFolder = FSO.GetFolder(cType.BaseFolder)
For Each oFile In oFolder.Files
Expand Down

0 comments on commit 89b5406

Please sign in to comment.