문제

This code:

int main()
{
   wchar_t fnucs2[260];
   wcscpy(fnucs2, L"//buildserver7500/wec");
   std::wcout << L" | wstat: " << fnucs2 << std::endl;
   struct _stat32i64 b;
   int r;
   r = _wstat32i64(fnucs2, &b);            

   return 0;
}

Update: same thing happens with non-wide versions.

Generates a number of SMB2 requests with the last character of the path truncated (\buildserver7500\we). I suspect this issue is tied to a large number of issues in our system with network shares. Any clues as to why this is happening?

Wireshark capture of issue

도움이 되었습니까?

해결책

Stat doesn't work on the share itself. Code using stat to work on arbitrary unc paths needs a special case for \\server\share.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top