diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5b355e47..35e2443d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,3 +6,4 @@ - [Peter Yasi](https://github.com/pyasi) - [Nicole Tibay](https://github.com/neequole) - [Rods](https://github.com/rods-honorio) +- [Jerome Brown](https://github.com/oWretch) diff --git a/shallow_backup/backup.py b/shallow_backup/backup.py index f3192e61..e1e0d530 100644 --- a/shallow_backup/backup.py +++ b/shallow_backup/backup.py @@ -114,12 +114,13 @@ def backup_configs(backup_path, dry_run: bool = False, skip=False): continue quoted_dest = quote(dest) - if os.path.isdir(config_path): - copytree(config_path, quoted_dest, symlinks=True) - elif os.path.isfile(config_path): + expanded_path = expand_to_abs_path(config_path) + if os.path.isdir(expanded_path): + copytree(expanded_path, quoted_dest, symlinks=True) + elif os.path.isfile(expanded_path): parent_dir = Path(dest).parent safe_mkdir(parent_dir) - copyfile(config_path, quoted_dest) + copyfile(expanded_path, quoted_dest) def backup_packages(backup_path, dry_run: bool = False, skip=False):