@rljson/fs-agent 0.0.5 → 0.0.7

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/dist/fs-agent.js +12 -5
  2. package/package.json +1 -1
package/dist/fs-agent.js CHANGED
@@ -385,16 +385,23 @@ class FsScanner {
385
385
  });
386
386
  }
387
387
  } catch {
388
+ let rootExists = false;
388
389
  try {
389
390
  await stat(this._rootPath);
390
- await this.scan();
391
- await this._notifyChange({
392
- type: "deleted",
393
- path: relativePath
394
- });
391
+ rootExists = true;
395
392
  } catch {
396
393
  this.stopWatch();
397
394
  }
395
+ if (rootExists) {
396
+ try {
397
+ await this.scan();
398
+ await this._notifyChange({
399
+ type: "deleted",
400
+ path: relativePath
401
+ });
402
+ } catch {
403
+ }
404
+ }
398
405
  }
399
406
  }
400
407
  _findTreeByPath(relativePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/fs-agent",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Rljson fs-agent description",
5
5
  "homepage": "https://github.com/rljson/fs-agent",
6
6
  "bugs": "https://github.com/rljson/fs-agent/issues",