-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Prevent loading containers from "old" folders #258
Prevent loading containers from "old" folders #258
Conversation
Devs, see CURA-3923. |
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.
I am pushing to get this in before 2.6 final, since I consider it a pretty big issue. Just found one small thing you may want to look at.
UM/Settings/ContainerRegistry.py
Outdated
@@ -141,6 +141,8 @@ def getEmptyInstanceContainer(self) -> InstanceContainer: | |||
# that were already added when the first call to this method happened will not be re-added. | |||
def load(self) -> None: | |||
files = [] | |||
old_file_expression = re.compile("\\" + os.sep + "old\\" + os.sep + "\d+\\" + os.sep) |
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.
I'd prefer to use re.compile(r"\{sep}old\{sep}\d+\{sep}".format(sep = os.sep)
here since this makes it less of a string puzzle. Additionally it avoids needing to escape the slashes due to using "raw string" mode.
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.
Agreed, much better.
7e074c0
to
524d34d
Compare
|
524d34d
to
e85ab8f
Compare
Thanks for the quick fix, merged. |
This PR prevents loading containers from "old/" folders. These files are backups from the version upgrade system.
This fixes Ultimaker/Cura#1902, Ultimaker/Cura#1855, Ultimaker/Cura#1874 and many others in the forum
See Ultimaker/Cura#1902 (comment)