Skip to content

Commit b4ea4e5

Browse files
committed
modify:does not response error code when dir query is empty
1 parent 6b1d0b6 commit b4ea4e5

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

XEngine_Source/XEngine_StorageApp/Storage_APPTask/Storage_TaskManage.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ bool XEngine_Task_Manage(LPCXSTR lpszAPIName, LPCXSTR lpszClientAddr, LPCXSTR lp
1111
LPCXSTR lpszAPIDelete = _X("Delete");
1212
LPCXSTR lpszAPIQuery = _X("Query");
1313
LPCXSTR lpszAPIDir = _X("Dir");
14+
LPCXSTR lpszAPIBucket = _X("Bucket");
1415
LPCXSTR lpszAPITask = _X("Task");
1516
RFCCOMPONENTS_HTTP_HDRPARAM st_HDRParam;
1617

@@ -311,16 +312,7 @@ bool XEngine_Task_Manage(LPCXSTR lpszAPIName, LPCXSTR lpszClientAddr, LPCXSTR lp
311312
if (0 == nOPCode)
312313
{
313314
//处理路径格式
314-
if (!SystemApi_File_EnumFile(tszRealDir, &ppszListDir, &nListCount, true, 2))
315-
{
316-
st_HDRParam.bIsClose = true;
317-
st_HDRParam.nHttpCode = 404;
318-
319-
HttpProtocol_Server_SendMsgEx(xhCenterHttp, tszSDBuffer, &nSDLen, &st_HDRParam);
320-
XEngine_Net_SendMsg(lpszClientAddr, tszSDBuffer, nSDLen, STORAGE_NETTYPE_HTTPCENTER);
321-
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("业务客户端:%s,请求查询文件夹:%s,失败,错误:%lX"), lpszClientAddr, tszRealDir, SystemApi_GetLastError());
322-
return false;
323-
}
315+
SystemApi_File_EnumFile(tszRealDir, &ppszListDir, &nListCount, true, 2);
324316
Protocol_StoragePacket_DirOperator(tszRVBuffer, &nRVLen, &ppszListDir, nListCount);
325317
BaseLib_Memory_Free((XPPPMEM)&ppszListDir, nListCount);
326318
HttpProtocol_Server_SendMsgEx(xhCenterHttp, tszSDBuffer, &nSDLen, &st_HDRParam, tszRVBuffer, nRVLen);

0 commit comments

Comments
 (0)