diff --git a/lib/core.js b/lib/core.js index 2cd82bd..7c479a1 100644 --- a/lib/core.js +++ b/lib/core.js @@ -248,7 +248,12 @@ async function unsubscribePackageAnnoucements(packageAnnoucementsTopic) { } async function exportPackages(db) { - await ipfs.files.rm('/forage/export', { recursive: true }) + try{ + await ipfs.files.rm('/forage/export', { recursive: true }) + } catch { + // no existing export folder + } + await ipfs.files.mkdir('/forage/export', {parents: true}) var loadpkgs = new Promise((resolve, reject) => {