Different junctions are displayed like they are the same

File operations are displayed incorrectly in a dual folder display while viewing two different folder junctions is two different PCs.

How to reproduce:

Left folder displaying: C:\Folder which is a junction to C:\Folder2 in ThisPC.

Right folder displaying: \\OtherPC\C$\Folder which is a junction to C:\Folder2 in OtherPC.

Then create a folder in the left folder, it will be incorrectly displayed in the right folder too like if you were viewing the same folder in the same PC in both sides, which you don’t.

What am I doing wrong?

Thank you in advance!

1 Like

If you refresh (F5) the side showing the other PC, is the folder still shown?

What type of junction is it? So we can try recreating the situation. E.g. Is it a hardlink, or symlink?

F5 removes the displayed ghost folder from OtherPC.

To recreate the situation execute the following two commands in both PCs:

mkdir C:\Folder2
mklink /j C:\Folder C:\Folder2

then view from ThisPC: C:\Folder and \\OtherPC\C$\Folder
and create a folder into C:\Folder

You should view the junction on the OtherPC via a parent shared folder or an administrative share $.

Thanks. I've reproduced the issue.

This seems like a Windows bug to me, at least so far. When we ask Windows for the path the remote junction points to, it tells us "C:\Folder2", which is obviously not correct (on the machine where the information was requested).

I'm not sure if we can safely assume the returned path is relative to the server, since symlinks can point to other servers.

We'll have a think about it and see if we can come up with a solution that doesn't break something else in the process.

Perhaps if you pull the list of the mapped network drives from OtherPC, for the current user session, you can check recursively if "C:" is finally pointing to \ThisPC.

A quick and dirty workaround is to try to create a temp file into \\OtherPC\C$\Folder and check if you can read it from C:\Folder before you remove it.