We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c086bdf commit 2b3fdbeCopy full SHA for 2b3fdbe
invokeai/backend/util/util.py
@@ -4,6 +4,7 @@
4
import re
5
import shutil
6
import stat
7
+import sys
8
import unicodedata
9
from pathlib import Path
10
@@ -91,4 +92,7 @@ def safe_rmtree(path: Path):
91
92
93
See: https://docs.python.org/3/library/shutil.html#rmtree-example
94
"""
- shutil.rmtree(path, onexc=remove_readonly)
95
+ if sys.version_info >= (3, 12):
96
+ shutil.rmtree(str(path), onexc=remove_readonly)
97
+ else:
98
+ shutil.rmtree(str(path), onerror=remove_readonly)
0 commit comments