浏览代码

Z991239-2196 #comment fix: linux下兼容zip包中\\的路径

Signed-Off-By: commit-hook
刘文涛80174520 4 年之前
父节点
当前提交
f6bf3dc5e7
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      Module/mod_UpgradeRun/XUnZipZilb.cpp

+ 6 - 1
Module/mod_UpgradeRun/XUnZipZilb.cpp

@@ -250,7 +250,12 @@ int unZipCurrentFile(zipFile zf, string destDirPath)
 
 	//替换newFileName字符串中的'/'到对应平台路径
 #ifdef RVC_OS_WIN
-	if (!replaceInPlace(newFileName, "/", "\\")) {
+	if (!replacePlace(newFileName, "/", "\\")) {
+		Dbg("replaceInPlace zip fileName fail:zipFileName(%s)", newFileName.c_str());
+		return -1;
+	}
+#else
+	if (!replacePlace(newFileName, "\\", "/")) {
 		Dbg("replaceInPlace zip fileName fail:zipFileName(%s)", newFileName.c_str());
 		return -1;
 	}