mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-11 23:46:15 +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.
|
||||
*/
|
||||
private static CaseNodeData upgradeCaseNodeData(String nodePath, CaseNodeData oldNodeData) throws CaseNodeDataException, CaseMetadataException, ParseException, IOException, CoordinationServiceException, InterruptedException {
|
||||
final CaseMetadata metadata = getCaseMetadata(nodePath);
|
||||
CaseNodeData nodeData;
|
||||
switch (oldNodeData.getVersion()) {
|
||||
case 0:
|
||||
/*
|
||||
* Version 0 node data consisted of only the version number and the
|
||||
* errors occurred flag and was only written when an auto ingest job
|
||||
* error occurred. To upgrade from version 0, the version 1 fields
|
||||
* need to be set from the case metadata and the errors occurred
|
||||
* flag needs to be carried forward. Note that the last accessed
|
||||
* date gets advanced to now, since it is otherwise unknown.
|
||||
* Version 0 node data consisted of only the version number and
|
||||
* the errors occurred flag and was only written when an auto
|
||||
* ingest job error occurred. To upgrade from version 0, the
|
||||
* version 1 fields need to be set from the case metadata and
|
||||
* the errors occurred flag needs to be carried forward. Note
|
||||
* that the last accessed date gets advanced to now, since it is
|
||||
* otherwise unknown.
|
||||
*/
|
||||
final CaseMetadata metadata = getCaseMetadata(nodePath);
|
||||
nodeData = new CaseNodeData(metadata);
|
||||
nodeData.setErrorsOccurred(oldNodeData.getErrorsOccurred());
|
||||
break;
|
||||
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);
|
||||
nodeData = oldNodeData;
|
||||
|
Loading…
x
Reference in New Issue
Block a user