correct check for webdav

This commit is contained in:
fyears
2022-01-01 23:47:00 +08:00
parent 5b703334d7
commit e9bb61ced4
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -290,8 +290,8 @@ export const deleteFromRemote = async (
};
export const checkConnectivity = async (client: WrappedWebdavClient) => {
await client.init();
try {
await client.init();
const results = await getRemoteMeta(client, "/");
if (results === undefined) {
return false;
+3 -1
View File
@@ -809,7 +809,9 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
if (res) {
new Notice("Great! The webdav server can be accessed.");
} else {
new Notice("The webdav server cannot be reached.");
new Notice(
"The webdav server cannot be reached (possible to be any of address/username/password/authtype/CORS errors)."
);
}
});
});