[Bf-blender-cvs] [46a14bd6a31] blender-v2.93-release: Fix T88670: Load Previous Settings does not copy symlinks

Brecht Van Lommel noreply at git.blender.org
Mon May 31 18:22:43 CEST 2021


Commit: 46a14bd6a317ead29dfdbf038bd30d49a656249e
Author: Brecht Van Lommel
Date:   Mon May 31 17:24:35 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB46a14bd6a317ead29dfdbf038bd30d49a656249e

Fix T88670: Load Previous Settings does not copy symlinks

The same code existed in 2.82 and earlier so this should be safe. Removing the
custom implementation of shutil.copytree in f34d5d9 did not correctly add back
the option to copy symlinks.

===================================================================

M	release/scripts/startup/bl_operators/userpref.py

===================================================================

diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py
index 7547184dc04..564a7b69957 100644
--- a/release/scripts/startup/bl_operators/userpref.py
+++ b/release/scripts/startup/bl_operators/userpref.py
@@ -144,7 +144,7 @@ class PREFERENCES_OT_copy_prev(Operator):
 
     def execute(self, _context):
         import shutil
-        shutil.copytree(self._old_path(), self._new_path(), dirs_exist_ok=True)
+        shutil.copytree(self._old_path(), self._new_path(), dirs_exist_ok=True, symlinks=True)
 
         # reload preferences and recent-files.txt
         bpy.ops.wm.read_userpref()



More information about the Bf-blender-cvs mailing list