1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop, Mobile: Print name of file when import fails

This commit is contained in:
Laurent Cozic
2025-04-17 13:03:31 +01:00
parent 56e2d3da89
commit c3fe0edeeb

View File

@@ -80,6 +80,8 @@ export default class InteropService_Importer_Raw extends InteropService_Importer
for (let i = 0; i < stats.length; i++) {
const stat = stats[i];
try {
if (stat.isDirectory()) continue;
if (fileExtension(stat.path).toLowerCase() !== 'md') continue;
@@ -139,6 +141,10 @@ export default class InteropService_Importer_Raw extends InteropService_Importer
}
await ItemClass.save(item, { isNew: true, autoTimestamp: false });
} catch (error) {
error.message = `Could not import: ${stat.path}: ${error.message}`;
throw error;
}
}
for (let i = 0; i < noteTagsToCreate.length; i++) {