Skip to content

<filesystem>: read_symlink does not work with junctions #2077

@SibiSiddharthan

Description

@SibiSiddharthan

Command-line test case

C:\Temp> mkdir a
C:\Temp> mklink /J b a

C:\Temp>type repro.cpp
#include <filesystem>
#include <iostream>

using namespace std;
namespace fs = std::filesystem;

int main()
{
	error_code ec;
	auto p = fs::read_symlink("b",ec);
	printf("%ls %d %s\n",p.c_str(), ec.value(), ec.message().c_str());
}

C:\Temp>cl /EHsc /std:c++17 .\repro.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28019.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

repro.cpp
Microsoft (R) Incremental Linker Version 14.23.28019.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:repro.exe
repro.obj

C:\Temp>.\repro.exe

Expected behavior
a 0 The operation completed successfully.

Observed behavior
 4393 The tag present in the reparse point buffer is invalid.

STL version

9a9820d

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis issue is incorrect or by design

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions