From 68365ac62745d38dc0ab7a9a0eab90f9032a86a1 Mon Sep 17 00:00:00 2001 From: Luper Rouch Date: Sat, 9 Feb 2013 15:30:46 +0100 Subject: move: copying source files with symlinks=True, and expanding target to an absolute path --- dotfiles/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/core.py b/dotfiles/core.py index 90a9ba4..21c96fd 100644 --- a/dotfiles/core.py +++ b/dotfiles/core.py @@ -217,12 +217,13 @@ class Dotfiles(object): def move(self, target): """Move the repository to another location.""" + target = realpath_expanduser(target) if os.path.exists(target): raise ValueError('Target already exists: %s' % (target)) if not self.dry_run: - shutil.copytree(self.repository, target) + shutil.copytree(self.repository, target, symlinks=True) shutil.rmtree(self.repository) else: print("Recursive copy %s => %s" % (self.repository, target)) -- cgit v1.2.3