mobiletto 1.1.30 → 1.1.31

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 +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -523,11 +523,11 @@ async function mobiletto (driverPath, key, secret, opts, encryption = null) {
523
523
  return META_LOAD_QUEUE
524
524
  }
525
525
 
526
- const waitForFiles = (entries, resolve) => {
526
+ const waitForFiles = (files, entries, resolve) => {
527
527
  if (files.length === entries.length) {
528
528
  resolve(files)
529
529
  } else {
530
- setTimeout(() => { waitForFiles(entries, resolve) }, 1000)
530
+ setTimeout(() => { waitForFiles(files, entries, resolve) }, 1000)
531
531
  }
532
532
  }
533
533
 
@@ -537,7 +537,7 @@ async function mobiletto (driverPath, key, secret, opts, encryption = null) {
537
537
  const job = { dirent, entry, files }
538
538
  metaLoadQueue().add(META_LOAD_JOB_NAME, job)
539
539
  }
540
- await new Promise(resolve => waitForFiles(entries, resolve))
540
+ await new Promise(resolve => waitForFiles(files, entries, resolve))
541
541
  return files
542
542
  }
543
543
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.1.30",
3
+ "version": "1.1.31",
4
4
  "description": "A storage layer that presents a uniform interface to Amazon S3, Backblaze B2, and local storage",
5
5
  "main": "index.js",
6
6
  "keywords": [