I can see here (https://superuser.com/questions/343074/directory-junction-vs-directory-symbolic-link) that by default the system does not follow the symlink on remote volumes, any chance to change the default behavior. Or is there a new feature in Windows 2016 that could to the job better...
cleanup:if(!ret) {#ifndefOS_FUNC_NO_SERVERServer->Log("Creating junction failed. Last error="+nconvert((int)GetLastError()), LL_ERROR);#endif}delete[]buf;if(hJunc!=INVALID_HANDLE_VALUE) CloseHandle(hJunc);if(!ret) { RemoveDirectoryW(lname.c_str()); }returnret; } 开发者ID:Averroes,...
Remove-Itemis thinking the link is a directory and so failing to delete it. If the code is changed such thatFile.Delete(junction)is used instead of native calls, you get: PS C:\Users\anschwa\src\PowerShell> rm .\foobar\ -Force Confirm The item at C:\Users\anschwa\src\PowerShell\fo...
Using a symbolic link (or junction point, on NTFS volumes) This method is not portable. While it may be an acceptable solution for a solo developer, in a collaborative development environment, it's a non-option because it doesn't travel with the application source-code and is therefore cumb...