adjust search paths for addon installers
authorMichael Gilbert <mgilbert@debian.org>
Sat, 19 Mar 2022 00:48:02 +0000 (00:48 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Sat, 19 Mar 2022 00:48:02 +0000 (00:48 +0000)
forwarded: not-needed

Gbp-Pq: Topic debianization
Gbp-Pq: Name addons.patch

dlls/appwiz.cpl/addons.c

index cfc51155f578803dd8ac89433938e787d8ba2f40..c035e776635d1a33fec46894310e0b8829f77147 100644 (file)
@@ -207,7 +207,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"\\" );
@@ -307,12 +307,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;
 }