summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/winres
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-20 11:28:07 +0100
committerSimon Rettberg2018-03-20 11:28:07 +0100
commit93071c89c1cdbdfa221e91655e83c52a5b5f9ce2 (patch)
tree1483f421177b9fe27cb542ca45ff29e39c3bc63c /core/modules/run-virt/winres
parent[dnbd3] add openslx PATH (diff)
downloadmltk-93071c89c1cdbdfa221e91655e83c52a5b5f9ce2.tar.gz
mltk-93071c89c1cdbdfa221e91655e83c52a5b5f9ce2.tar.xz
mltk-93071c89c1cdbdfa221e91655e83c52a5b5f9ce2.zip
[run-virt] Try harder when detecting webdav
Diffstat (limited to 'core/modules/run-virt/winres')
-rw-r--r--core/modules/run-virt/winres/src/winres.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/modules/run-virt/winres/src/winres.c b/core/modules/run-virt/winres/src/winres.c
index 1a28c916..71d470f0 100644
--- a/core/modules/run-virt/winres/src/winres.c
+++ b/core/modules/run-virt/winres/src/winres.c
@@ -870,10 +870,14 @@ static void postSuccessfulMount(const netdrive_t *d, wchar_t *letter)
MultiByteToWideChar(CP_UTF8, 0, d->path, -1, tmp, MAX_PATH);
StringCchPrintfW(wTarget, MAX_PATH, L"\"%s\"", tmp);
DeleteFileW(wShortcut);
- if (letter == NULL || *letter == '\0' || d->path[0] == '\\' || d->path[1] == '\\') {
+ if (letter == NULL || *letter == '\0') {
createFolderShortcut(wTarget, wShortcut, letter);
- } else {
+ } else if (strstr(d->path, "@SSL") != NULL || strstr(d->path, "webdav") != NULL
+ || strstr(d->path, "WebDav") != NULL || strstr(d->path, "WebDAV") != NULL
+ || strstr(d->path, "@ssl") != NULL) {
createFolderShortcut(letter, wShortcut, letter);
+ } else {
+ createFolderShortcut(wTarget, wShortcut, letter);
}
// Fix paths and kill explorer if it's the home directory
if (_folderStatus != FS_OK && strncmp(d->shortcut, "Home-", 5) == 0) {