skip already gzipped files in json -> gzip migration

This commit is contained in:
Werner Robitza 2023-06-02 20:08:05 +02:00
parent 51d58227c8
commit de75e6686b

View File

@ -223,6 +223,9 @@ exports.migrateToGzip = (dataDir) => {
);
files.push(`latest-canonical.json`);
for(const file of files) {
// skip if already gzipped
if (file.indexOf(".gz") != -1) continue;
const path = `${dataDir}/${file}`
console.log(`${path} -> ${path}.gz`);
const data = readJSON(path);