adjust search paths for addon installers
authorMichael Gilbert <mgilbert@debian.org>
Tue, 13 Sep 2022 00:46:21 +0000 (01:46 +0100)
committerMichael Gilbert <mgilbert@debian.org>
Tue, 13 Sep 2022 00:46:21 +0000 (01:46 +0100)
forwarded: not-needed

Gbp-Pq: Topic debianization
Gbp-Pq: Name addon-paths.patch

dlls/appwiz.cpl/addons.c

index b4da6137d724885d9890c32e47265c66bcd8266a..e0542f7695df1a33675a73f388ed220061ab430d 100644 (file)
@@ -209,7 +209,7 @@ static enum install_res install_from_dos_file(const WCHAR *dir, const WCHAR *sub
 
     lstrcpyW( path, dir );
     if (!wcsncmp( path, L"\\??\\", 4 ))  path[1] = '\\';  /* change \??\ into \\?\ */
-    if (len && path[len-1] != '/' && path[len-1] != '\\') path[len++] = '\\';
+    if (len && path[len-1] != '/' && path[len-1] != '\\' && path[len-1] != '-') path[len++] = '\\';
 
     lstrcpyW( path + len, subdir );
     lstrcatW( path, L"\\" );
@@ -318,12 +318,14 @@ static enum install_res install_from_default_dir(void)
         heap_free(dir_buf);
     }
 
+    /* debian's DATADIR already defines the wine subdir */
     if (ret == INSTALL_NEXT)
-        ret = install_from_unix_file(INSTALL_DATADIR "/wine/", addon->subdir_name, addon->file_name);
+        ret = install_from_unix_file(INSTALL_DATADIR "/", addon->subdir_name, addon->file_name);
+
+    /* also, always search /usr/share/wine/ */
     if (ret == INSTALL_NEXT && strcmp(INSTALL_DATADIR, "/usr/share") != 0)
         ret = install_from_unix_file("/usr/share/wine/", addon->subdir_name, addon->file_name);
-    if (ret == INSTALL_NEXT)
-        ret = install_from_unix_file("/opt/wine/", addon->subdir_name, addon->file_name);
+
     return ret;
 }