mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
[CABINET]
Fix handling of trailing backslash. Patch by Thomas Faber. ROSTESTS-135 svn path=/trunk/; revision=73926
This commit is contained in:
parent
298e2fb71c
commit
3e49feb4e7
2 changed files with 42 additions and 0 deletions
29
reactos/dll/win32/cabinet/cabinet_ros.diff
Normal file
29
reactos/dll/win32/cabinet/cabinet_ros.diff
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
Index: fdi.c
|
||||||
|
===================================================================
|
||||||
|
--- fdi.c (revision 73922)
|
||||||
|
+++ fdi.c (working copy)
|
||||||
|
@@ -2039,11 +2039,24 @@
|
||||||
|
fullpath[0] = '\0';
|
||||||
|
if (pathlen) {
|
||||||
|
strcpy(fullpath, userpath);
|
||||||
|
+#ifndef __REACTOS__
|
||||||
|
if (fullpath[pathlen - 1] != '\\')
|
||||||
|
strcat(fullpath, "\\");
|
||||||
|
+#else
|
||||||
|
+ if (fullpath[pathlen - 1] == '\\')
|
||||||
|
+ fullpath[pathlen - 1] = '\0';
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
+#ifndef __REACTOS__
|
||||||
|
if (filenamelen)
|
||||||
|
+#else
|
||||||
|
+ if (filenamelen) {
|
||||||
|
+ strcat(fullpath, "\\");
|
||||||
|
+#endif
|
||||||
|
strcat(fullpath, cab->mii.nextname);
|
||||||
|
+#ifdef __REACTOS__
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
TRACE("full cab path/file name: %s\n", debugstr_a(fullpath));
|
||||||
|
|
|
@ -2039,11 +2039,24 @@ static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state
|
||||||
fullpath[0] = '\0';
|
fullpath[0] = '\0';
|
||||||
if (pathlen) {
|
if (pathlen) {
|
||||||
strcpy(fullpath, userpath);
|
strcpy(fullpath, userpath);
|
||||||
|
#ifndef __REACTOS__
|
||||||
if (fullpath[pathlen - 1] != '\\')
|
if (fullpath[pathlen - 1] != '\\')
|
||||||
strcat(fullpath, "\\");
|
strcat(fullpath, "\\");
|
||||||
|
#else
|
||||||
|
if (fullpath[pathlen - 1] == '\\')
|
||||||
|
fullpath[pathlen - 1] = '\0';
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifndef __REACTOS__
|
||||||
if (filenamelen)
|
if (filenamelen)
|
||||||
|
#else
|
||||||
|
if (filenamelen) {
|
||||||
|
strcat(fullpath, "\\");
|
||||||
|
#endif
|
||||||
strcat(fullpath, cab->mii.nextname);
|
strcat(fullpath, cab->mii.nextname);
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TRACE("full cab path/file name: %s\n", debugstr_a(fullpath));
|
TRACE("full cab path/file name: %s\n", debugstr_a(fullpath));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue