Do not delete resources/templates directories after copying class files. Fixes #2

This commit is contained in:
Erik C. Thauvin 2024-06-20 20:23:47 -07:00
parent cbafe96064
commit fab86c0245
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 1 additions and 17 deletions

View file

@ -144,15 +144,13 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
var inf_classes_dir = new File(stagingInfDirectory, "classes"); var inf_classes_dir = new File(stagingInfDirectory, "classes");
BootUtils.mkDirs(inf_classes_dir); BootUtils.mkDirs(inf_classes_dir);
for (var dir : sourceDirectories()) { for (var dir : sourceDirectories_) {
if (dir.exists()) { if (dir.exists()) {
FileUtils.copyDirectory(dir, inf_classes_dir); FileUtils.copyDirectory(dir, inf_classes_dir);
} else if (LOGGER.isLoggable(Level.WARNING)) { } else if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("Directory not found: " + dir.getAbsolutePath()); LOGGER.warning("Directory not found: " + dir.getAbsolutePath());
} }
} }
BootUtils.deleteDirectories(new File(inf_classes_dir, "resources"), new File(inf_classes_dir, "templates"));
} }
/** /**

View file

@ -38,20 +38,6 @@ public final class BootUtils {
// no-op // no-op
} }
/**
* Deletes the given directories.
*
* @param directories one or more directories to delete
* @throws FileUtilsErrorException if an error occurs
*/
public static void deleteDirectories(File... directories) throws FileUtilsErrorException {
for (var d : directories) {
if (d.exists()) {
FileUtils.deleteDirectory(d);
}
}
}
/** /**
* Calculates the given file size in bytes, kilobytes, megabytes, gigabytes or terabytes. * Calculates the given file size in bytes, kilobytes, megabytes, gigabytes or terabytes.
* *