From 361063577256783cbb4b95b28bb514cbf0b2dc20 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro <gregd@basistech.com> Date: Thu, 12 May 2022 13:08:09 -0400 Subject: [PATCH] more fixes --- .../autopsy/modules/interestingitems/FileSetsDefinitions.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FileSetsDefinitions.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FileSetsDefinitions.java index 46c575117a..bca8a2d750 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FileSetsDefinitions.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FileSetsDefinitions.java @@ -60,7 +60,9 @@ Map<String, FilesSet> getFilesSets() { * @returns True if the definitions are written to disk, false otherwise. */ static boolean writeDefinitionsFile(String basePath, String fileName, Map<String, FilesSet> interestingFilesSets) throws FilesSetsManager.FilesSetsManagerException { - try (final NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(Paths.get(basePath, fileName).toString()))) { + File outputPath = Paths.get(basePath, fileName).toFile(); + outputPath.mkdirs(); + try (final NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(outputPath))) { out.writeObject(new FileSetsDefinitions(interestingFilesSets)); } catch (IOException ex) { throw new FilesSetsManager.FilesSetsManagerException(String.format("Failed to write settings to %s", fileName), ex); -- GitLab