hypercore-storage 1.13.0 → 1.14.0
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.
- package/index.js +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -356,6 +356,7 @@ class CorestoreStorage {
|
|
|
356
356
|
this.bootstrap = storage !== null
|
|
357
357
|
this.path = storage !== null ? storage : path.join(db.path, '..')
|
|
358
358
|
this.readOnly = !!opts.readOnly
|
|
359
|
+
this.allowBackup = !!opts.allowBackup
|
|
359
360
|
|
|
360
361
|
// tmp sync fix for simplicty since not super deployed yet
|
|
361
362
|
if (this.bootstrap && !this.readOnly) tmpFixStorage(this.path)
|
|
@@ -462,7 +463,7 @@ class CorestoreStorage {
|
|
|
462
463
|
|
|
463
464
|
await this.db.ready()
|
|
464
465
|
|
|
465
|
-
if (this.bootstrap && !this.readOnly) {
|
|
466
|
+
if (this.bootstrap && !this.readOnly && !this.allowBackup) {
|
|
466
467
|
const corestoreFile = path.join(this.path, 'CORESTORE')
|
|
467
468
|
|
|
468
469
|
if (!(await DeviceFile.resume(corestoreFile, { id: this.id }))) {
|