a little help for webdav addr

This commit is contained in:
fyears 2022-03-21 23:26:09 +08:00
parent 4f3e8803da
commit e2e6f6a12c

View File

@ -527,6 +527,19 @@ export const checkConnectivity = async (
client: WrappedWebdavClient,
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 {
await client.init();
const results = await getRemoteMeta(client, "/");