mirror of
https://github.com/remotely-save/remotely-save.git
synced 2024-06-07 21:10:45 +00:00
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,
|
||||
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, "/");
|
||||
|
Loading…
Reference in New Issue
Block a user