-->

moved symlink disappears from Windows Explorer

2019-06-07 15:47发布

问题:

I'd like to change the structure of our source code inside ClearCase before using a custom script to export that to another SCM system. As the original code may still change slightly, I did this by symlinking the contents of the existing folders into the new structure.

Now the desired folder structure has changed and I need to move those symlinks (or start the whole process over, which is my fall-back strategy if no one can help me here). But after moving any symlinks (inside the same VOB in a dynamic view by the way), Windows Explorer does not show the elements at the new position. ClearCase Explorer does show them as expected, in the new location and tagged as a symbolic link; but they appearantly lost their target, as the option "Warp to target" in the context menu is greyed out.

Restarting the PC and un-/remounting the VOB all did nothing to better the situaton.

Can anyone tell me how this could happen, how to prevent this from happening again and possibly how I can restore the appearantly broken links?

回答1:

If the target has itself changed, it seems normal than the VOB symlinks loses their target, and that the "Warp to Symlink Target" contextual menu doesn't work.

Check that your symlink (used here in a dynamic view) is a soft link.
But if move the link and its target change, I think it is quicker to remove and recreate the symlink.


Actually, the OP SvenS mentions in the comments:

the target path of symlinks may be stored relative to the link.
This seems to be the case, as I just moved them back to their previous location and the targets reappeared in windows Explorer.