Skip to content

Commit 4900dc7

Browse files
committed
Merge branch 'issue#1743' of https://github.com/solid/node-solid-server into issue#1743
2 parents 9e14a1d + a99473d commit 4900dc7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/handlers/put.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function handler (req, res, next) {
1111
res.header('MS-Author-Via', 'SPARQL')
1212
const contentType = req.get('content-type')
1313

14-
// check if a folder or resource with same name exists
14+
// check whether a folder or resource with same name exists
1515
try {
1616
const ldp = req.app.locals.ldp
1717
await ldp.checkItemName(req)

lib/ldp.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class LDP {
158158
extension = ''
159159
}
160160

161-
// allways return a valid URL.
161+
// always return a valid URL.
162162
const resourceUrl = await ldp.getAvailableUrl(hostname, containerPath, { slug, extension, container })
163163
debug.handlers('POST -- Will create at: ' + resourceUrl)
164164

@@ -327,7 +327,7 @@ class LDP {
327327
} catch (err) { }
328328
}
329329

330-
// check if a document (or container) has the same name than a document (or container)
330+
// check whether a document (or container) has the same name as another document (or container)
331331
async checkItemName (url) {
332332
let testName, testPath
333333
const { hostname, pathname } = this.resourceMapper._parseUrl(url) // (url.url || url)
@@ -585,13 +585,13 @@ class LDP {
585585

586586
let itemName = slug.endsWith(extension) || slug.endsWith(this.suffixAcl) || slug.endsWith(this.suffixMeta) ? slug : slug + extension
587587
try {
588-
// check resource exists
588+
// check whether resource exists
589589
const context = container ? '/' : ''
590590
await this.resourceMapper.mapUrlToFile({ url: (requestUrl + itemName + context) })
591591
itemName = `${uuid.v1()}-${itemName}`
592592
} catch (e) {
593593
try {
594-
// check resource with same name exists
594+
// check whether resource with same name exists
595595
const context = !container ? '/' : ''
596596
await this.resourceMapper.mapUrlToFile({ url: (requestUrl + itemName + context) })
597597
itemName = `${uuid.v1()}-${itemName}`

0 commit comments

Comments
 (0)