-
-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I can't move game files after loading them with UnityPy.
I call a function that has env = UnityPy.load(file_path) inside it, then after that when I try to move the file to another location, I can't do that.
Here's a simplified version of the code:
The function:
def is_excluded_file(file_path):
try:
env = UnityPy.load(file_path)
except:
return False
for path,obj in env.container.items():
if condition(path):
return True
return False
for file_path in file_walker(assetbundle_path): #recursively yields every file's path in the folder
if is_excluded_file(file_path):
dir_path = os.path.dirname(file_path)
nested_path_lib = Path(os.path.join(move_folder, dir_path))
nested_path_lib.mkdir(parents=True, exist_ok=True)
shutil.move(file_path, os.path.join(move_folder, file_path))
I get an error at that last line, saying that it's being used by another process (which is UnityPy).
Is there a way to "close" this process?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working