Thank you for supporting and maintaining org mode.
I wanted to use org-store-link for eshell, but it failed.
Looked like dired-directory was nil, I fixed it by calling (eshell/pwd) to get pwd.
I tested with and without TRAMP, works like a charm.
The patch did not create new test case failures, but for master branch on my machine I saw 6 test case failure (not related to patch).
6 unexpected results:
I will try investigate and address them in another patch.