Function calls of "_stat-family" do not support Symbolic Directory Links for C Runtime Library functions from Visual Studio 2013, 2012, or 2010
This article helps you resolve the problem where function calls of _stat-family
do not support Symbolic Directory Links for C Runtime Library functions from Visual Studio 2013, 2012, or 2010.
Original product version: Visual Studio 2013, Visual Studio 2012, Visual Studio 2010
Original KB number: 4531963
Symptoms
You create a Symbolic Directory Link to a local directory or a remote file share. This creates the link C:\link
that points to the C:\temp
folder, as follows:
mklink /d C:\link C:\temp
If your application is built by using Microsoft Visual Studio 2013, 2012, or 2010, unpredictable or false results occur when you use C Runtime Library (CRT) function calls of _stat-family
.
Resolution
To resolve this problem, migrate your C or C++ project to a latest version of Microsoft Visual Studio. This is because C Runtime function calls of _stat-family
of the Universal C Runtime are used by Visual Studio 2019, 2017, and 2015. These versions support Symbolic Directory Links.
Workaround
To work around this problem, create a link as follows:
mklink C:\abc C\temp
mkdir C:\abc\link
If you use a _stat-family
function call that has a C:\abc\link
path, the result is always correct.
More information
For more information about the C Runtime Library stat-functions, see C Runtime Library (stat-functions).
Applies to
- Visual Studio Ultimate 2013
- Visual Studio Professional 2013
- Visual Studio Premium 2013
- Visual Studio Ultimate 2012
- Visual Studio Professional 2012
- Visual Studio Premium 2012
- Visual Studio Ultimate 2010
- Visual Studio Professional 2010
- Visual C++ 2010 Express