mirror of https://github.com/Chocobozzz/PeerTube
Fix remove end slash function
parent
e128425b7b
commit
bcd4cf0586
|
@ -57,8 +57,8 @@ getServerCredentials(command)
|
||||||
exitError('--tmpdir %s: directory does not exist or is not accessible', program[ 'tmpdir' ])
|
exitError('--tmpdir %s: directory does not exist or is not accessible', program[ 'tmpdir' ])
|
||||||
}
|
}
|
||||||
|
|
||||||
removeEndSlashes(url)
|
url = removeEndSlashes(url)
|
||||||
removeEndSlashes(program[ 'targetUrl' ])
|
program[ 'targetUrl' ] = removeEndSlashes(program[ 'targetUrl' ])
|
||||||
|
|
||||||
const user = { username, password }
|
const user = { username, password }
|
||||||
|
|
||||||
|
@ -330,9 +330,7 @@ function isNSFW (info: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeEndSlashes (url: string) {
|
function removeEndSlashes (url: string) {
|
||||||
while (url.endsWith('/')) {
|
return url.replace(/\/+$/, '')
|
||||||
url.slice(0, -1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function promptPassword () {
|
async function promptPassword () {
|
||||||
|
|
Loading…
Reference in New Issue