[PATCH v2 1/4] shell32: Append a directory separator if necessary in UNIXFS_path_to_pidl().

Zebediah Figura z.figura12 at gmail.com
Thu Feb 13 23:03:03 CST 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/shell32/shfldr_unixfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index a37b1bf5881..17a5513bd94 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -640,6 +640,8 @@ static HRESULT UNIXFS_path_to_pidl(UnixFolder *pUnixFolder, LPBC pbc, const WCHA
         /* Relative dos or unix path. Concat with this folder's path */
         int cBasePathLen = strlen(pUnixFolder->m_pszPath);
         memcpy(szCompletePath, pUnixFolder->m_pszPath, cBasePathLen);
+        if (szCompletePath[cBasePathLen - 1] != '/')
+            szCompletePath[cBasePathLen++] = '/';
         WideCharToMultiByte(CP_UNIXCP, 0, path, -1, szCompletePath + cBasePathLen, 
                             FILENAME_MAX - cBasePathLen, NULL, NULL);
         pNextPathElement = szCompletePath + cBasePathLen - 1;
-- 
2.25.0




More information about the wine-devel mailing list