diff options
author | Luper Rouch <luper.rouch@gmail.com> | 2013-02-09 15:30:46 +0100 |
---|---|---|
committer | Luper Rouch <luper.rouch@gmail.com> | 2013-02-09 15:30:46 +0100 |
commit | 68365ac62745d38dc0ab7a9a0eab90f9032a86a1 (patch) | |
tree | 3faa89f8b8a91eb01e84624a0d08eb343a26a2a5 | |
parent | 3a74687a1fd38df28b30e239fbb77ebfea853d1c (diff) | |
download | dotfiles-68365ac62745d38dc0ab7a9a0eab90f9032a86a1.tar.gz dotfiles-68365ac62745d38dc0ab7a9a0eab90f9032a86a1.tar.bz2 dotfiles-68365ac62745d38dc0ab7a9a0eab90f9032a86a1.zip |
move: copying source files with symlinks=True, and expanding target to an absolute path
-rw-r--r-- | dotfiles/core.py | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |