Replaced double slashes in saved paths with single ones

This commit is contained in:
Eugene Livis 2018-12-13 10:46:50 -05:00
parent 461f0a3a98
commit 201f5745e5

View File

@ -243,12 +243,15 @@ class ReportCaseUco implements GeneralReportModule {
catalog.writeStringField("@type", "Trace");
catalog.writeFieldName("propertyBundle");
catalog.writeStartArray();
catalog.writeStartArray();
catalog.writeStartObject();
// replace double slashes with single ones
caseDirPath = caseDirPath.replaceAll("\\\\", "/");
catalog.writeStringField("@type", "File");
if (dbType == TskData.DbType.SQLITE) {
catalog.writeStringField("filePath", caseDirPath + java.io.File.separator + dbFileName);
catalog.writeStringField("filePath", caseDirPath + "/" + dbFileName);
catalog.writeBooleanField("isDirectory", false);
} else {
catalog.writeStringField("filePath", caseDirPath);
@ -300,7 +303,10 @@ class ReportCaseUco implements GeneralReportModule {
}
}
}
// replace double back slashes with single ones
imageName = imageName.replaceAll("\\\\", "/");
return saveDataSourceInCaseUcoFormat(jsonGenerator, imageName, imageSize, selectedDataSourceId, caseTraceId);
}