Skip to content

Commit 59d3c98

Browse files
committed
fixed:the problem that path does not support absolute path
1 parent 10bb1b8 commit 59d3c98

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

XEngine_Source/XEngine_StorageApp/StorageApp_Download.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ BOOL XEngine_Task_HttpDownload(LPCTSTR lpszClientAddr, LPCTSTR lpszMsgBuffer, in
267267
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _T("下载客户端:%s,请求文件失败,可能BUCKET:%s 不正确,错误:%lX"), lpszClientAddr, pSt_HTTPParam->tszHttpUri, StorageHelp_GetLastError());
268268
return FALSE;
269269
}
270+
int nPathType = 0;
270271
_stprintf(tszFileDir, _T("%s%s"), st_StorageBucket.tszFilePath, st_StorageBucket.tszFileName);
272+
BaseLib_OperatorString_GetPath(tszFileDir, &nPathType);
273+
BaseLib_OperatorString_FixPath(tszFileDir, nPathType);
271274

272275
int nHashLen = 0;
273276
UCHAR tszHashKey[MAX_PATH];

XEngine_Source/XEngine_StorageApp/StorageApp_UPLoader.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ BOOL XEngine_Task_HttpUPLoader(LPCTSTR lpszClientAddr, LPCTSTR lpszMsgBuffer, in
203203
return FALSE;
204204
}
205205
}
206+
int nPathType = 0;
206207
_stprintf(tszFileDir, _T("%s/%s"), st_StorageBucket.tszFilePath, tszFileName);
208+
BaseLib_OperatorString_GetPath(tszFileDir, &nPathType);
209+
BaseLib_OperatorString_FixPath(tszFileDir, nPathType);
207210

208211
if (!Session_UPStroage_Exist(lpszClientAddr))
209212
{

0 commit comments

Comments
 (0)