0

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

Thomas
  • 3,348
  • 4
  • 35
  • 49
  • Just found this on msdn: "_stat doesn't recognize UNC share name as folder. _stat works fine on UNC folders, just remember that the first level is a "share" not a folder" – Thomas Dec 06 '12 at 20:15

1 Answers1

0

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

Thomas
  • 3,348
  • 4
  • 35
  • 49