aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dotfiles/core.py4
-rw-r--r--tests/test_basic.py1
2 files changed, 2 insertions, 3 deletions
diff --git a/dotfiles/core.py b/dotfiles/core.py
index a0c3a40..eba9ef8 100644
--- a/dotfiles/core.py
+++ b/dotfiles/core.py
@@ -139,7 +139,7 @@ class Dotfiles(object):
"""Recursive helper for :meth:`_load`."""
src_dir = os.path.join(self.repository, sub_dir)
- if sub_dir:
+ if sub_dir and not self.prefix:
# Add a dot to first level of packages
dst_dir = os.path.join(self.homedir, '.%s' % sub_dir)
else:
@@ -158,7 +158,7 @@ class Dotfiles(object):
self._load_recursive(pkg_path)
else:
add_dot = False if self.no_dot_prefix else not bool(sub_dir)
- self.dotfiles.append(Dotfile(dotfile[len(self.prefix):],
+ self.dotfiles.append(Dotfile(dotfile,
os.path.join(src_dir, dotfile),
dst_dir, add_dot=add_dot,
dry_run=self.dry_run))
diff --git a/tests/test_basic.py b/tests/test_basic.py
index ad6a7ab..a36b688 100644
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -405,7 +405,6 @@ class DotfilesTestCase(unittest.TestCase):
self.assertTrue(os.path.islink(
os.path.join(self.homedir, '.config/gtk-3.0')))
- @pytest.mark.xfail()
def test_package_and_prefix(self):
"""Test syncing a package when using a non-default prefix."""