@zenfs/core 0.7.3 → 0.7.5

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.
@@ -125,7 +125,17 @@ export function Async(FS) {
125
125
  this._isInitialized = false;
126
126
  }
127
127
  async ready() {
128
- await this._initialize();
128
+ if (this._isInitialized) {
129
+ return this;
130
+ }
131
+ try {
132
+ await this.crossCopy('/');
133
+ this._isInitialized = true;
134
+ }
135
+ catch (e) {
136
+ this._isInitialized = false;
137
+ throw e;
138
+ }
129
139
  return this;
130
140
  }
131
141
  renameSync(oldPath, newPath, cred) {
@@ -202,22 +212,6 @@ export function Async(FS) {
202
212
  }
203
213
  }
204
214
  }
205
- /**
206
- * Called once to load up files from async storage into sync storage.
207
- */
208
- async _initialize() {
209
- if (this._isInitialized) {
210
- return;
211
- }
212
- try {
213
- await this.crossCopy('/');
214
- this._isInitialized = true;
215
- }
216
- catch (e) {
217
- this._isInitialized = false;
218
- throw e;
219
- }
220
- }
221
215
  /**
222
216
  * @internal
223
217
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenfs/core",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "A filesystem in your browser",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist",