hypercore-storage 1.9.2 → 1.9.4
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 +5 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -438,6 +438,8 @@ class CorestoreStorage {
|
|
|
438
438
|
try {
|
|
439
439
|
if (this.version === VERSION) return
|
|
440
440
|
|
|
441
|
+
await this.db.ready()
|
|
442
|
+
|
|
441
443
|
if (this.bootstrap && !this.readOnly) {
|
|
442
444
|
const corestoreFile = path.join(this.path, 'CORESTORE')
|
|
443
445
|
|
|
@@ -877,6 +879,9 @@ function createColumnFamily (db, opts = {}) {
|
|
|
877
879
|
|
|
878
880
|
// TODO: remove in like 3-6 mo
|
|
879
881
|
function tmpFixStorage (p) {
|
|
882
|
+
// if CORESTORE file is written, new format
|
|
883
|
+
if (fs.existsSync(path.join(p, 'CORESTORE'))) return
|
|
884
|
+
|
|
880
885
|
let files = []
|
|
881
886
|
|
|
882
887
|
try {
|