mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Merge branch 'blender-v4.3-release'
This commit is contained in:
commit
8570dd22e7
1 changed files with 13 additions and 3 deletions
|
|
@ -23,7 +23,14 @@ import subprocess
|
|||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from types import (
|
||||
TracebackType,
|
||||
)
|
||||
from typing import (
|
||||
Any,
|
||||
)
|
||||
from collections.abc import (
|
||||
Callable,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
|
|
@ -285,9 +292,12 @@ def remove_directory(directory: Path) -> None:
|
|||
Takes care of clearing read-only attributes which might prevent deletion on
|
||||
Windows.
|
||||
"""
|
||||
|
||||
def remove_readonly(func, path, _):
|
||||
"Clear the readonly bit and reattempt the removal"
|
||||
def remove_readonly(
|
||||
func: Callable[..., Any],
|
||||
path: str,
|
||||
_: tuple[type[BaseException], BaseException, TracebackType],
|
||||
) -> None:
|
||||
"Clear the read-only bit and reattempt the removal."
|
||||
os.chmod(path, stat.S_IWRITE)
|
||||
func(path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue