-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use relpath? #284
Comments
Hi @floriankrb, So what's the correct thing to do here? Something like this?
|
@iainrussell your fix is one possibility, the other option is to return The idea after the |
Yes, I think that any of these two solutions would work. I would go for what @iainrussell proposed, based on the (very biased) assumption that if you use windows in a production environment, security and information leak are not your main concern. |
Actually, after reading what @alexamici wrote, I think I'm more inclined to return |
This use of relpath :
cfgrib/cfgrib/messages.py
Line 552 in 3a53b3a
is causing an issue on window when path and start are on different drives.
Indeed in the os.path.relpath documentation:
This happens in real use cases:
https://github.com/Climdyn/climetlab-eumetnet-postprocessing-benchmark/runs/5217438193?check_suite_focus=true#step:8:508
ValueError: path is on mount 'C:', start on mount 'D:'
Perhaps a try/catch would help here?
The text was updated successfully, but these errors were encountered: