Skip to content

Commit 54fb1fd

Browse files
danielcomptontomix26
authored andcommitted
Check if directory that should hold PG binaries exists (#119)
1 parent 8d88246 commit 54fb1fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/zonky/test/db/postgres/embedded/EmbeddedPostgres.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ private static void extractTxz(InputStream stream, String targetDir) throws IOEx
687687

688688
while ((entry = tarIn.getNextTarEntry()) != null) {
689689
final String individualFile = entry.getName();
690-
final File fsObject = new File(targetDir + "/" + individualFile);
690+
final File fsObject = new File(targetDir, individualFile);
691691

692692
if (entry.isSymbolicLink() || entry.isLink()) {
693693
Path target = FileSystems.getDefault().getPath(entry.getLinkName());
@@ -747,7 +747,7 @@ private static File prepareBinaries(PgBinaryResolver pgBinaryResolver, File over
747747
{
748748
PREPARE_BINARIES_LOCK.lock();
749749
try {
750-
if (PREPARE_BINARIES.containsKey(pgBinaryResolver)) {
750+
if (PREPARE_BINARIES.containsKey(pgBinaryResolver) && PREPARE_BINARIES.get(pgBinaryResolver).exists()) {
751751
return PREPARE_BINARIES.get(pgBinaryResolver);
752752
}
753753

0 commit comments

Comments
 (0)