Skip to content
Snippets Groups Projects
Commit 79bc8e3e authored by Mike Lynch's avatar Mike Lynch
Browse files

Wasn't giving the files 'path' attributes

parent 259fea65
No related merge requests found
...@@ -222,6 +222,9 @@ function make_history(dataset, people, owner, approver, dates) { ...@@ -222,6 +222,9 @@ function make_history(dataset, people, owner, approver, dates) {
// The dataLocations are expected to have contentSize, // The dataLocations are expected to have contentSize,
// encodingFormat and fileFormat already set // encodingFormat and fileFormat already set
// This assumes that the directory is flat ie all of the files
// are in the root
function make_files(datapub) { function make_files(datapub) {
if( !datapub['dataLocations'] ) { if( !datapub['dataLocations'] ) {
return []; return [];
...@@ -231,6 +234,7 @@ function make_files(datapub) { ...@@ -231,6 +234,7 @@ function make_files(datapub) {
return { return {
'@id': dl['name'], '@id': dl['name'],
'name': dl['name'], 'name': dl['name'],
'path': dl['name'],
'@type': 'File', '@type': 'File',
'contentSize': dl['contentSize'], 'contentSize': dl['contentSize'],
'encodingFormat': dl['encodingFormat'], 'encodingFormat': dl['encodingFormat'],
......
{ {
"name": "datacrate", "name": "datacrate",
"version": "1.0.0", "version": "1.0.1",
"description": "utilities for building and manipulating DataCrate data packages", "description": "utilities for building and manipulating DataCrate data packages",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment