Skip to content

Commit 02ec73f

Browse files
author
nicola
committed
removing function isMetadataFile
1 parent db328de commit 02ec73f

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

‎lib/header.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function linksHandler (req, res, next) {
4444
var filename = utils.uriToFilename(req.url, root)
4545

4646
filename = path.join(filename, req.path)
47-
if (ldp.isMetadataFile(filename)) {
47+
if (path.extname(filename) === ldp.suffixMeta) {
4848
debug.metadata('Trying to access metadata file as regular file.')
4949

5050
return next(error(404, 'Trying to access metadata file as regular file'))

‎lib/ldp.js‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,3 @@ LDP.prototype.getAvailablePath = function (host, containerURI, slug, callback) {
462462
callback(newPath)
463463
})
464464
}
465-
466-
LDP.prototype.isMetadataFile = function (filename) {
467-
if (path.extname(filename) === this.suffixMeta) {
468-
return true
469-
}
470-
return false
471-
}

0 commit comments

Comments
 (0)