Skip to content

Commit

Permalink
Appraisal: fix bulk extractor results
Browse files Browse the repository at this point in the history
This fixes the paths of the bulk extractor reports by adding the
`data` directory created by bags.
  • Loading branch information
replaceafill committed Aug 22, 2019
1 parent 21bfbe5 commit 862c4cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/archivematicaCommon/lib/elasticSearchFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ def _get_file_formats(f):

def _list_bulk_extractor_reports(transfer_path, file_uuid):
reports = []
log_path = os.path.join(transfer_path, "logs", "bulk-" + file_uuid)
log_path = os.path.join(transfer_path, "data", "logs", "bulk-" + file_uuid)

if not os.path.isdir(log_path):
return reports
Expand Down
4 changes: 3 additions & 1 deletion src/dashboard/src/components/file/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def bulk_extractor(request, fileuuid):
features = {}

for report in reports:
relative_path = os.path.join("logs", "bulk-" + fileuuid, report + ".txt")
relative_path = os.path.join(
"data", "logs", "bulk-" + fileuuid, report + ".txt"
)
url = storage_service.extract_file_url(f.transfer_id, relative_path)
response = requests.get(
url, timeout=django_settings.STORAGE_SERVICE_CLIENT_TIMEOUT
Expand Down

0 comments on commit 862c4cd

Please sign in to comment.