mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2025-02-17 03:48:25 +00:00
Merge pull request #569 from WebTools-NG/#554-Find-Media-and-extended-characters
#554 Normalize keys
This commit is contained in:
commit
867bf6d0ca
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ const getAllFiles = function( dirPath, orgDirPath, arrayOfFiles ) {
|
|||
// Force forward slash
|
||||
let lookupPath = path.join(dirPath, curFile).replaceAll('\\', '/');
|
||||
log.silly(`[FindMedia.js] (getAllFiles) - Adding ${lookupPath.slice(orgDirPath.length + 1)}: ${ path.join(dirPath, curFile) }`);
|
||||
findMedia.filesFound[lookupPath.slice(orgDirPath.length + 1)] = path.join(dirPath, curFile);
|
||||
findMedia.filesFound[lookupPath.slice(orgDirPath.length + 1).normalize('NFC')] = path.join(dirPath, curFile);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -346,7 +346,7 @@ const findMedia = new class FINDMEDIA {
|
|||
log.silly(`[FindMedia.js] (scanPMSLibrary) - pmsFile compare: ${this.validExt.includes(path.extname(pmsFile).toLowerCase().slice(1))}`);
|
||||
if (this.validExt.includes(path.extname(pmsFile).toLowerCase().slice(1))){
|
||||
const libPathFound = this.getLibPath( files[idxFiles] );
|
||||
var lookup = pmsFile.slice(libPathFound.length + 1);
|
||||
var lookup = pmsFile.slice(libPathFound.length + 1).normalize('NFC');
|
||||
log.silly(`[FindMedia.js] (scanPMSLibrary) - lookup is: ${lookup}`);
|
||||
if ( Object.prototype.hasOwnProperty.call(this.filesFound, lookup)) {
|
||||
// We need to remove from detected files, since we found it
|
||||
|
|
Loading…
Add table
Reference in a new issue