File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ declare module "obsidian" {
92
92
fileCache : FileCache
93
93
metadataCache : MetadataCacheMap
94
94
resolvedLinks : ResolvedLinks
95
+ uniqueFileLookup : {
96
+ get : ( name : string ) => TFile [ ]
97
+ add : ( name : string , file : TFile ) => void
98
+ }
95
99
96
100
computeMetadataAsync : ( buffer : ArrayBuffer ) => Promise < ExtendedCachedMetadata >
97
101
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ export default class MetadataCachePatcher extends Patcher {
27
27
if ( FilepathHelper . extension ( file . path ) !== 'canvas' )
28
28
return next . call ( this , file , ...args )
29
29
30
+ // Add file to uniqueFileLookup
31
+ this . uniqueFileLookup . add ( file . name . toLowerCase ( ) , file )
32
+
30
33
// Update the cache
31
34
const fileHash = await HashHelper . getFileHash ( that . plugin , file )
32
35
this . saveFileCache ( file . path , {
You can’t perform that action at this time.
0 commit comments