Keep drive letter in mapped network drive on Windows #1540
Unanswered
OlivierArgentieri
asked this question in
Q&A
Replies: 2 comments
-
I have created this PR and a new issue #1541 for this, but i don't know if it'had to be done like that. I have tested this code locally, generated a new rez install from this fork/PR and it's work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The behavior of os.path.realpath has changed since python 3.8.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context:
We are trying to wrap some of our softwares in rez packages, theses packages are on one nfs network drive.
So on windows we have mapped a drive letter to this network storage.
In my rezconfig i have:
(packages_path from
rez config
output)Examples:
In this example we will try to launch a software, that doesn't support UNC path, here for our example, vscode.
With this setup, when i write
rez env vscode
thenwhere code
i can see the binary path but, this is a full network path, of my drive letter
Y
.And what i expect is:
Investigation:
So to understand what happen here, we have search in the code of rez and we found something:
here in the rez code
os.path.realpath('Y:/')
will return the full network path instead of our mapped drive letter.So locally we have edited this file to change:
path = os.path.normpath(os.path.realpath(path))
with:
path = os.path.normpath(path)
Just for our test and investigation
And it works !:
But i really don't like to customize rez code to match this use case.
Questions:
So now, i'm creating this thread just to explain my issue and what we found, to know if you have any better way to do this ?
To keep our mapping drive on windows, in the resolved context and binary path, because some of our software cannot be run on UNC path (VSCode or RV for example)
Thank you !
Beta Was this translation helpful? Give feedback.
All reactions