mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 18:11:47 +01:00
updated how initial test data is updated
Former-commit-id: dd94b61a39efdd619c23beddf25f683dc1fe5791
This commit is contained in:
@@ -56,11 +56,12 @@ public abstract class BaseDBTestCase extends TestCase {
|
|||||||
String indexPath = getDataDirectory().getCanonicalPath();
|
String indexPath = getDataDirectory().getCanonicalPath();
|
||||||
java.io.File f = new File(indexPath);
|
java.io.File f = new File(indexPath);
|
||||||
if (!f.exists() || (f.isDirectory() && f.listFiles().length == 0)) {
|
if (!f.exists() || (f.isDirectory() && f.listFiles().length == 0)) {
|
||||||
|
f = f.getParentFile();
|
||||||
f.mkdirs();
|
f.mkdirs();
|
||||||
FileInputStream fis = null;
|
FileInputStream fis = null;
|
||||||
ZipInputStream zin = null;
|
ZipInputStream zin = null;
|
||||||
try {
|
try {
|
||||||
File path = new File(BaseDBTestCase.class.getClassLoader().getResource("db.cve.zip").getPath());
|
File path = new File(BaseDBTestCase.class.getClassLoader().getResource("data.zip").getPath());
|
||||||
fis = new FileInputStream(path);
|
fis = new FileInputStream(path);
|
||||||
zin = new ZipInputStream(new BufferedInputStream(fis));
|
zin = new ZipInputStream(new BufferedInputStream(fis));
|
||||||
ZipEntry entry;
|
ZipEntry entry;
|
||||||
|
|||||||
Reference in New Issue
Block a user