braidfs 0.0.102 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +14 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -396,12 +396,9 @@ async function sync_url(url) {
396
396
  return p
397
397
  }
398
398
  var get_fullpath = async () => {
399
- if (freed) return
400
399
  var p = fullpath
401
- while (await wait_on(is_dir(p))) {
402
- if (freed) return
400
+ while (await is_dir(p))
403
401
  p = require("path").join(p, 'index')
404
- }
405
402
  return p
406
403
  }
407
404
  if (!unsync_url.cache) unsync_url.cache = {}
@@ -412,12 +409,21 @@ async function sync_url(url) {
412
409
 
413
410
  delete braid_text.cache[url]
414
411
  for (let f of await braid_text.get_files_for_key(url)) {
415
- console.log(`trying to delete ${f}`)
416
- try { await require('fs').promises.unlink(f) } catch (e) {}
412
+ try {
413
+ console.log(`trying to delete: ${f}`)
414
+ await require('fs').promises.unlink(f)
415
+ } catch (e) {}
417
416
  }
418
417
 
419
- try { await require('fs').promises.unlink(meta_path) } catch (e) {}
420
- try { await require('fs').promises.unlink(await get_fullpath()) } catch (e) {}
418
+ try {
419
+ console.log(`trying to delete: ${meta_path}`)
420
+ await require('fs').promises.unlink(meta_path)
421
+ } catch (e) {}
422
+ try {
423
+ var fp = await get_fullpath()
424
+ console.log(`trying to delete: ${fp}`)
425
+ await require('fs').promises.unlink(fp)
426
+ } catch (e) {}
421
427
  }
422
428
  sync_url.cache[path] = sync_url.chain = sync_url.chain.then(init)
423
429
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braidfs",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
4
4
  "description": "braid technology synchronizing files and webpages",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braidfs",