mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Make sure we use a different version.txt to prevent having to redownload DB
This commit is contained in:
parent
b5988e19c1
commit
15785fad73
4 changed files with 28 additions and 22 deletions
|
|
@ -2,6 +2,7 @@ import fs from "fs";
|
|||
import path from "path";
|
||||
import os from "os";
|
||||
import { ui } from "../environment/userInteraction.js";
|
||||
import { getEcoSystem } from "./settings.js";
|
||||
|
||||
export function getScanTimeout() {
|
||||
const config = readConfigFile();
|
||||
|
|
@ -68,12 +69,14 @@ function readConfigFile() {
|
|||
|
||||
function getDatabasePath() {
|
||||
const aikidoDir = getAikidoDirectory();
|
||||
return path.join(aikidoDir, "malwareDatabase.json");
|
||||
const ecosystem = getEcoSystem() || "js";
|
||||
return path.join(aikidoDir, `malwareDatabase_${ecosystem}.json`);
|
||||
}
|
||||
|
||||
function getDatabaseVersionPath() {
|
||||
const aikidoDir = getAikidoDirectory();
|
||||
return path.join(aikidoDir, "version.txt");
|
||||
const ecosystem = getEcoSystem() || "js";
|
||||
return path.join(aikidoDir, `version_${ecosystem}.txt`);
|
||||
}
|
||||
|
||||
function getConfigFilePath() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue