(file: TFile | TFolder)
| 438 | } |
| 439 | |
| 440 | private async handleIgnoredPathDelete(file: TFile | TFolder): Promise<void> { |
| 441 | const normalizedPath = this.normalizeIgnoredPath(file.path); |
| 442 | const filtered = this.settings.ignoredFiles.filter((path) => { |
| 443 | if (path === normalizedPath) { |
| 444 | return false; |
| 445 | } |
| 446 | |
| 447 | return !(file instanceof TFolder && path.startsWith(`${normalizedPath}/`)); |
| 448 | }); |
| 449 | |
| 450 | if (filtered.length === this.settings.ignoredFiles.length) { |
| 451 | return; |
| 452 | } |
| 453 | |
| 454 | this.settings.ignoredFiles = this.normalizeIgnoredFiles(filtered); |
| 455 | await this.persistIgnoredFiles(); |
| 456 | } |
| 457 | |
| 458 | private isIgnoredPathMatch(path: string, ignoredPath: string): boolean { |
| 459 | if (path === ignoredPath) { |
no test coverage detected