-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
For toppings avoid issues with backslashes #120
Conversation
This leaded to issues when the relative path has been attached to an url. The IliDataCache.download_file now: - replaces the backslashes with slashes on URL - normalizes the path to the current system Still ili2db does not that. The IliToppingMaker creating those paths is now storing everything with backslashes as well, nerveless if it's an url or a file path (because it cannot know that). Windows can handel slashes in the path as well AFAIK, what means it's more stable to have slashes.
859a42e
to
04f4593
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan to adjust the topping exporter URL/path generation as well? For instance, replacing the os
module by pathlib
?
In the "modelbaker" part ilitoppingmaker.Target I just replaced the backslashes. Are there better ways to do it with The library toppingmaker I leave like it is. Because people might use it primarily locally. |
As far as I know, you'd need to tell
or
|
But the question is in the end how you write it to the yaml (or the ilidata file) and there you have to decide if it's slash or backslash or am I not getting something? |
I think I'm missing something since the beginning :). That's why I wrote the question. |
ah no, you are right. I got confused by the PureWindowsPath and I thought it creates a windows path out of it (what is the opposite of what I wanted). But it does exactly what we need. Thanks. |
On windows backslashes where created with topping exporter file paths.
This leaded to issues when the relative path has been attached to an url.
The IliDataCache.download_file now:
Still ili2db does not that.
The IliToppingMaker creating those paths is now storing everything with backslashes as well, nerveless if it's an url or a file path (because it cannot know that).
Windows can handel slashes in the path as well AFAIK, what means it's more stable to have slashes.