Skip to content

Commit f9e1b70

Browse files
committed
Fix globbing crash with new ResourceMapper
1 parent 2f7fbb3 commit f9e1b70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/handlers/get.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ async function handler (req, res, next) {
135135

136136
async function globHandler (req, res, next) {
137137
const ldp = req.app.locals.ldp
138-
const { path: filename } = await ldp.resourceMapper.mapUrlToFile({ url: req })
138+
// TODO: This is a hack, as globbing and resource mapping in combination is complex
139+
// TODO: Proper support for this is not implemented, as globbing support will probably be removed in the future.
140+
const filename = ldp.resourceMapper._getFullPath(req)
139141
const requestUri = (await ldp.resourceMapper.mapFileToUrl({ path: filename, hostname: req.hostname })).url
140142

141143
const globOptions = {

0 commit comments

Comments
 (0)