mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Misc polishing for case node data fixes
This commit is contained in:
parent
51d50e5c2b
commit
720cb155ac
@ -178,24 +178,26 @@ public final class CaseNodeData {
|
|||||||
* @throws CaseMetadataException If the case metadata cannot be read.
|
* @throws CaseMetadataException If the case metadata cannot be read.
|
||||||
*/
|
*/
|
||||||
private static CaseNodeData upgradeCaseNodeData(String nodePath, CaseNodeData oldNodeData) throws CaseNodeDataException, CaseMetadataException, ParseException, IOException, CoordinationServiceException, InterruptedException {
|
private static CaseNodeData upgradeCaseNodeData(String nodePath, CaseNodeData oldNodeData) throws CaseNodeDataException, CaseMetadataException, ParseException, IOException, CoordinationServiceException, InterruptedException {
|
||||||
final CaseMetadata metadata = getCaseMetadata(nodePath);
|
|
||||||
CaseNodeData nodeData;
|
CaseNodeData nodeData;
|
||||||
switch (oldNodeData.getVersion()) {
|
switch (oldNodeData.getVersion()) {
|
||||||
case 0:
|
case 0:
|
||||||
/*
|
/*
|
||||||
* Version 0 node data consisted of only the version number and the
|
* Version 0 node data consisted of only the version number and
|
||||||
* errors occurred flag and was only written when an auto ingest job
|
* the errors occurred flag and was only written when an auto
|
||||||
* error occurred. To upgrade from version 0, the version 1 fields
|
* ingest job error occurred. To upgrade from version 0, the
|
||||||
* need to be set from the case metadata and the errors occurred
|
* version 1 fields need to be set from the case metadata and
|
||||||
* flag needs to be carried forward. Note that the last accessed
|
* the errors occurred flag needs to be carried forward. Note
|
||||||
* date gets advanced to now, since it is otherwise unknown.
|
* that the last accessed date gets advanced to now, since it is
|
||||||
|
* otherwise unknown.
|
||||||
*/
|
*/
|
||||||
|
final CaseMetadata metadata = getCaseMetadata(nodePath);
|
||||||
nodeData = new CaseNodeData(metadata);
|
nodeData = new CaseNodeData(metadata);
|
||||||
nodeData.setErrorsOccurred(oldNodeData.getErrorsOccurred());
|
nodeData.setErrorsOccurred(oldNodeData.getErrorsOccurred());
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/*
|
/*
|
||||||
* Version 1 node data did not have a minor version number field.
|
* Version 1 node data did not have a minor version number
|
||||||
|
* field.
|
||||||
*/
|
*/
|
||||||
oldNodeData.setMinorVersion(MINOR_VERSION);
|
oldNodeData.setMinorVersion(MINOR_VERSION);
|
||||||
nodeData = oldNodeData;
|
nodeData = oldNodeData;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user