fix getCollectionNameAndFolderPath

This commit is contained in:
Abhinav 2022-09-06 15:40:49 +05:30
parent a02e80e31f
commit 96b6769326

View file

@ -580,8 +580,11 @@ class watchFolderService {
try { try {
const mappings = this.getWatchMappings(); const mappings = this.getWatchMappings();
const mapping = mappings.find((mapping) => const mapping = mappings.find(
filePath.startsWith(mapping.folderPath) (mapping) =>
filePath.length > mapping.folderPath.length &&
filePath.startsWith(mapping.folderPath) &&
filePath[filePath.length] === '/'
); );
if (!mapping) { if (!mapping) {