pinokiod 3.9.15 → 3.9.16

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/kernel/loader.js +8 -2
  2. package/package.json +1 -1
package/kernel/loader.js CHANGED
@@ -94,8 +94,14 @@ class Loader {
94
94
  })
95
95
  return result
96
96
  }
97
- exists(abspath) {
98
- return new Promise(r=>fs.access(abspath, fs.constants.F_OK, e => r(!e)))
97
+ async exists(abspath) {
98
+ try {
99
+ await fs.promises.stat(abspath);
100
+ return true;
101
+ } catch (e) {
102
+ return false;
103
+ }
104
+ //return new Promise(r=>fs.access(abspath, fs.constants.F_OK, e => r(!e)))
99
105
  }
100
106
  }
101
107
  module.exports = Loader
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.9.15",
3
+ "version": "3.9.16",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {