Skip to content

Commit b8966e1

Browse files
Fixes bug that was causing OmittedPrefix to be case sensitive. Fixes #1
1 parent b692ed4 commit b8966e1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

DirectoryManager.cls

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Attribute VB_Creatable = False
88
Attribute VB_PredeclaredId = False
99
Attribute VB_Exposed = False
1010
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
11-
'Version 1.0.0 '
11+
'Version 1.0.1 '
1212
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1313
'MIT License '
1414
' '
@@ -135,7 +135,7 @@ Private Sub FindFilesAndFolders()
135135

136136
'Ignore the special folders '.' and '..'
137137
If RefFolders <> "." And RefFolders <> ".." Then
138-
If Left(RefFolders, Len(OmittedPrefixValue)) <> OmittedPrefixValue Or OmittedPrefixValue = "" Then 'Ignore the omitted prefixes, if specified
138+
If UCase(Left(RefFolders, Len(OmittedPrefixValue))) <> UCase(OmittedPrefixValue) Or OmittedPrefixValue = "" Then 'Ignore the omitted prefixes, if specified
139139
If (GetAttr(FolderPath & RefFolders) And vbDirectory) = vbDirectory Then
140140
FoundFoldersList.Add RefFolders, RefFolders
141141
Else
@@ -214,3 +214,4 @@ Private Function FormatFilePath(InputPath As String) As String
214214
End If
215215

216216
End Function
217+

ExampleWorkbook.xlsm

-4.34 KB
Binary file not shown.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Or,
2929
| Files | Collection (Read Only) | Returns an Excel Collection object. Each item inside contains another instance of DirectoryManager for the applicable file. |
3030
| Folders | Collection (Read Only) | Returns an Excel Collection object. Each item inside contains another instance of DirectoryManager for the applicable folder. |
3131
| Name | String (Read Only) | Returns the name of the file or folder. |
32-
| OmittedPrefix | String (Read/Write) | Defaults to an empty string. If set, this will omit all files and folders that start with the `OmittedPrefix` string during the file parsing process. Changing this value will cause the `DirectoryManager` instance to recalculate. This value passes down to all files and folders beneath it. |
32+
| OmittedPrefix | String (Read/Write) | Defaults to an empty string. If set, this will omit all files and folders that start with the `OmittedPrefix` string during the file parsing process. Changing this value will cause the `DirectoryManager` instance to recalculate. This value passes down to all files and folders beneath it. This variable is not case sensitive. |
3333
| Path | String (Read/Write) | Returns the full system path of the file or folder. |
3434

3535

@@ -84,7 +84,7 @@ End Sub
8484
```
8585

8686
## Use Omitted Characters to Exclude Files or Folders
87-
Setting the `OmittedPrefix` property to a non-empty string will cause the DirectoryManager to exclude any file or folder that starts with that string.
87+
Setting the `OmittedPrefix` property to a non-empty string will cause the DirectoryManager to exclude any file or folder that starts with that string. The value is not case sensitive.
8888

8989
This is useful if you want to use DirectoryManager to exclude specific folders or files from your project.
9090

0 commit comments

Comments
 (0)