File tree 1 file changed +11
-1
lines changed 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -107,10 +107,14 @@ func tryToReadZipArchive(zipPath string, archive *zipFile) {
107
107
// Handle a directory
108
108
lowerDir := strings .ToLower (dirPath )
109
109
if _ , ok := dirs [lowerDir ]; ! ok {
110
- dirs [ lowerDir ] = & compressedDir {
110
+ dir : = & compressedDir {
111
111
path : dirPath ,
112
112
entries : make (map [string ]EntryKind ),
113
113
}
114
+
115
+ // List the same directory both with and without the slash
116
+ dirs [lowerDir ] = dir
117
+ dirs [lowerDir + "/" ] = dir
114
118
}
115
119
} else {
116
120
// Handle a file
@@ -122,7 +126,10 @@ func tryToReadZipArchive(zipPath string, archive *zipFile) {
122
126
path : dirPath ,
123
127
entries : make (map [string ]EntryKind ),
124
128
}
129
+
130
+ // List the same directory both with and without the slash
125
131
dirs [lowerDir ] = dir
132
+ dirs [lowerDir + "/" ] = dir
126
133
}
127
134
dir .entries [baseName ] = FileEntry
128
135
}
@@ -147,7 +154,10 @@ func tryToReadZipArchive(zipPath string, archive *zipFile) {
147
154
path : dirPath ,
148
155
entries : make (map [string ]EntryKind ),
149
156
}
157
+
158
+ // List the same directory both with and without the slash
150
159
dirs [lowerDir ] = dir
160
+ dirs [lowerDir + "/" ] = dir
151
161
}
152
162
dir .entries [baseName ] = DirEntry
153
163
baseName = dirPath
You can’t perform that action at this time.
0 commit comments