Skip to content

Commit 89b5406

Browse files
Fix issue with orphaned file detection
Need to pass a dictionary, not a collection to the CompareToIndex function.
1 parent e5f6c32 commit 89b5406

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Version Control.accda.src/modules/modOrphaned.bas

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@ Public Sub ClearOrphanedSourceFiles(cType As IDbComponent)
5252
If cType.SingleFile Then Exit For
5353
Next varKey
5454

55+
' Build dictionary of included extensions
56+
For Each varExt In cType.FileExtensions
57+
dExtensions.Add varExt, vbNullString
58+
Next varExt
59+
5560
' Check for single-file exports with no items
5661
If cType.SingleFile Then
5762
If dItems.Count = 0 Then
5863
' No more of these items exist in the database.
5964
' (For example, IMEX specs)
6065
If FSO.FileExists(cType.SourceFile) Then
6166
' Compare to index to check for any source changes.
62-
CompareToIndex cType, cType.SourceFile, cType.FileExtensions, dBaseNames
67+
CompareToIndex cType, cType.SourceFile, dExtensions, dBaseNames
6368
End If
6469
End If
6570
Else
66-
' Build dictionary of included extensions
67-
For Each varExt In cType.FileExtensions
68-
dExtensions.Add varExt, vbNullString
69-
Next varExt
70-
7171
' Loop through files in folder
7272
Set oFolder = FSO.GetFolder(cType.BaseFolder)
7373
For Each oFile In oFolder.Files

0 commit comments

Comments
 (0)