Skip to content

Commit ab26ab3

Browse files
author
Rubaiyat Khondaker
committed
Critical bugfix - this.files now aligns with this.ownFiles
1 parent f9c3aed commit ab26ab3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/files-manager.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,21 @@ export class FileManager {
8181
await this.genFiles()
8282
}
8383
let files_changed: Array<File | RegexFile> = []
84-
for (let file of this.ownFiles) {
84+
let obfiles_changed: TFile[] = []
85+
for (let index in this.ownFiles) {
86+
const i = parseInt(index)
87+
let file = this.ownFiles[i]
8588
if (this.file_hashes.hasOwnProperty(file.path) && file.getHash() === this.file_hashes[file.path]) {
8689
//Indicates we've seen it in a scan before
8790
console.log("Skipping ", file.path, "as we've scanned it before.")
8891
} else {
8992
file.scanFile()
9093
files_changed.push(file)
94+
obfiles_changed.push(this.files[i])
9195
}
9296
}
9397
this.ownFiles = files_changed
98+
this.files = obfiles_changed
9499
}
95100

96101
async genRegexFiles() {

0 commit comments

Comments
 (0)