Stat doesn't work on the share itself. Code using stat to work on arbitrary unc paths needs a special case for \\server\share.
Path truncation issue with _wstat and Windows 7 share
Domanda
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?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow