1
Fork 0
mirror of https://github.com/Steffo99/obsidian-file-index.git synced 2024-10-16 05:07:26 +00:00

Warn if multiple files have the same basename

This commit is contained in:
Steffo 2023-11-06 14:49:28 +01:00
parent b91d190094
commit 57af065888
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -63,6 +63,9 @@ export default class SteffoFileIndexPlugin extends Plugin {
paths.push(file.path)
const basename = file.basename.toLocaleLowerCase()
if(basenames.hasOwnProperty(basename)) {
console.warn("[SteffoFileIndexPlugin] Multiple files with the same basename detected:", basenames[basename], file.path)
}
basenames[basename] = file.path
}