(test) Removing /tmp-guardrails as it doesn't hold in CI
This commit is contained in:
parent
23be648456
commit
40768e935b
@ -8,14 +8,7 @@ import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TestUtil {
|
||||
private static boolean isTempDir(Path dir) {
|
||||
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
|
||||
}
|
||||
|
||||
public static void clearTempDir(Path dir) {
|
||||
if (!isTempDir(dir)) {
|
||||
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
|
||||
}
|
||||
if (Files.isDirectory(dir)) {
|
||||
for (File f : dir.toFile().listFiles()) {
|
||||
File[] files = f.listFiles();
|
||||
|
@ -8,14 +8,7 @@ import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TestUtil {
|
||||
private static boolean isTempDir(Path dir) {
|
||||
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
|
||||
}
|
||||
|
||||
public static void clearTempDir(Path dir) {
|
||||
if (!isTempDir(dir)) {
|
||||
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
|
||||
}
|
||||
if (Files.isDirectory(dir)) {
|
||||
for (File f : dir.toFile().listFiles()) {
|
||||
File[] files = f.listFiles();
|
||||
|
@ -8,14 +8,7 @@ import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TestUtil {
|
||||
private static boolean isTempDir(Path dir) {
|
||||
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
|
||||
}
|
||||
|
||||
public static void clearTempDir(Path dir) {
|
||||
if (!isTempDir(dir)) {
|
||||
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
|
||||
}
|
||||
if (Files.isDirectory(dir)) {
|
||||
for (File f : dir.toFile().listFiles()) {
|
||||
File[] files = f.listFiles();
|
||||
|
@ -8,14 +8,7 @@ import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TestUtil {
|
||||
private static boolean isTempDir(Path dir) {
|
||||
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
|
||||
}
|
||||
|
||||
public static void clearTempDir(Path path) {
|
||||
if (!isTempDir(path)) {
|
||||
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
|
||||
}
|
||||
if (Files.isDirectory(path)) {
|
||||
for (File f : path.toFile().listFiles()) {
|
||||
File[] files = f.listFiles();
|
||||
|
Loading…
Reference in New Issue
Block a user