fix: Add guard and log against corrupt zip

This commit is contained in:
Tom Moor
2023-06-18 07:43:14 -04:00
parent 9cfe5da70b
commit b3c08fdb48

View File

@@ -60,6 +60,13 @@ export default class ImportMarkdownZipTask extends ImportTask {
}
const zipObject = zip.files[child.path];
if (!zipObject) {
Logger.info("task", "Zip file referenced path that doesn't exist", {
path: child.path,
});
return;
}
const id = uuidv4();
// this is an attachment