Alexandre Julliard : cabinet: Make sure the cabinet file name doesn't end with a backslash.

Alexandre Julliard julliard at winehq.org
Tue Jun 28 15:53:09 CDT 2022


Module: wine
Branch: master
Commit: cdeaf7c87f2d87e638b397552e6cca36ab1ccc18
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=cdeaf7c87f2d87e638b397552e6cca36ab1ccc18

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 28 13:20:05 2022 +0200

cabinet: Make sure the cabinet file name doesn't end with a backslash.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/cabinet/fdi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c
index 7e2e6b8fdde..aae71d0e2a5 100644
--- a/dlls/cabinet/fdi.c
+++ b/dlls/cabinet/fdi.c
@@ -2055,6 +2055,8 @@ static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state
             }
             if (filenamelen)
               strcat(fullpath, cab->mii.nextname);
+            else if (fullpath[0])
+                fullpath[strlen(fullpath)-1] = 0; /* remove trailing backslash */
 
             TRACE("full cab path/file name: %s\n", debugstr_a(fullpath));
 




More information about the wine-cvs mailing list