a little help for webdav addr
This commit is contained in:
parent
4f3e8803da
commit
e2e6f6a12c
@ -527,6 +527,19 @@ export const checkConnectivity = async (
|
|||||||
client: WrappedWebdavClient,
|
client: WrappedWebdavClient,
|
||||||
callbackFunc?: any
|
callbackFunc?: any
|
||||||
) => {
|
) => {
|
||||||
|
if (
|
||||||
|
!(
|
||||||
|
client.webdavConfig.address.startsWith("http://") ||
|
||||||
|
client.webdavConfig.address.startsWith("https://")
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
const err = "Error: the url should start with http(s):// but it does not!";
|
||||||
|
log.debug(err);
|
||||||
|
if (callbackFunc !== undefined) {
|
||||||
|
callbackFunc(err);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await client.init();
|
await client.init();
|
||||||
const results = await getRemoteMeta(client, "/");
|
const results = await getRemoteMeta(client, "/");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user