forked from blender/blender
Campbell Barton
a5c5015dac
On Windows an entire directory may be locked when any files inside it are opened by another process. This can cause operations that recursively remove a directory (uninstalling & updating) to fail with a partially removed extension. The case of uninstalling was already handled, where failure to remove a directory would stage the extension for later removal. In the case of updating however, the user could be left with a broken (partially removed) extension where some files were removed, as the directory was locked, the update would fail to extract new files. Address this issue by renaming the directory before recursive removal. The following logic has been implemented: - If any files in the directory are locked, renaming will fail. So even though the operation fails the extension is left intact. - If renaming succeeds, it's possible to apply the update. While it's possible (albeit unlikely) recursive removal fails, which could be caused by file-system permissions issues corruption or a process could open a file between rename & removal. In this case the renamed directory is staged for later removal. Other changes: - Resolve a related problem where the user could install an extension previously staged for removal, now installing an extension ensured it's not removed later. This would occur if uninstalling failed, the user resolves directory-lock, uninstalls again, then re-installs the extension. - When an extension fails to be removed, don't attempt to remove user configuration for that extension. Prefer to keep the extension & it's settings in their "current state" if it can't be removed. |
||
---|---|---|
.. | ||
_bpy_internal | ||
bl_app_override | ||
bl_console_utils | ||
bl_i18n_utils | ||
bl_keymap_utils | ||
bl_previews_utils | ||
bl_rna_utils | ||
bl_text_utils | ||
bl_ui_utils | ||
bpy | ||
bpy_extras | ||
gpu_extras | ||
addon_utils.py | ||
animsys_refactor.py | ||
bl_app_template_utils.py | ||
blend_render_info.py | ||
bpy_restrict_state.py | ||
bpy_types.py | ||
console_python.py | ||
console_shell.py | ||
graphviz_export.py | ||
keyingsets_utils.py | ||
nodeitems_utils.py | ||
rna_info.py | ||
rna_keymap_ui.py | ||
rna_manual_reference.py | ||
rna_prop_ui.py | ||
rna_xml.py | ||
sys_info.py |