};
export const extractFilesData = (document: Document) => {
- const collectionUrlPrefix = /\/c=([0-9a-zA-Z\-]*)/;
+ const collectionUrlPrefix = /\/c=([^\/]*)/;
return Array
.from(document.getElementsByTagName('D:response'))
.slice(1) // omit first element which is collection itself
url,
id: [
collectionUuid ? collectionUuid : '',
- directory ? '/' + directory : '',
+ directory ? '/' + directory.replace(/^\//, '') : '',
'/' + name
].join(''),
name,