From 2f1c2a00401d8260404d2470925af1cfc8f3989c Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 15:48:49 -0400 Subject: [PATCH] 2505 adjusted code to use standard apache method to remove extension --- Core/src/org/sleuthkit/autopsy/ingest/IngestProfiles.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestProfiles.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestProfiles.java index 391b79f52f..a68a15078c 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestProfiles.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestProfiles.java @@ -25,6 +25,7 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; import org.openide.util.Exceptions; import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.autopsy.coreutils.PlatformUtil; @@ -51,7 +52,7 @@ public final class IngestProfiles { List profileList = new ArrayList<>(); if (directoryListing != null) { for (File child : directoryListing) { - String name = child.getName().replace(PROFILE_FILE_EXT, ""); //remove the extension + String name = FilenameUtils.removeExtension(child.getName()); String context = PROFILE_FOLDER + File.separator + name; String desc = ModuleSettings.getConfigSetting(context, PROFILE_DESC_KEY); String fileIngestFilter = ModuleSettings.getConfigSetting(context, PROFILE_FILTER_KEY);