Author: pschweitzer Date: Sun Feb 26 14:31:01 2017 New Revision: 73926
URL: http://svn.reactos.org/svn/reactos?rev=73926&view=rev Log: [CABINET] Fix handling of trailing backslash. Patch by Thomas Faber.
ROSTESTS-135
Added: trunk/reactos/dll/win32/cabinet/cabinet_ros.diff (with props) Modified: trunk/reactos/dll/win32/cabinet/fdi.c
Added: trunk/reactos/dll/win32/cabinet/cabinet_ros.diff URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/cabinet_r... ============================================================================== --- trunk/reactos/dll/win32/cabinet/cabinet_ros.diff (added) +++ trunk/reactos/dll/win32/cabinet/cabinet_ros.diff [iso-8859-1] Sun Feb 26 14:31:01 2017 @@ -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)); +
Propchange: trunk/reactos/dll/win32/cabinet/cabinet_ros.diff ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/dll/win32/cabinet/fdi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/fdi.c?rev... ============================================================================== --- trunk/reactos/dll/win32/cabinet/fdi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cabinet/fdi.c [iso-8859-1] Sun Feb 26 14:31:01 2017 @@ -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));