Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory during fonts backup #217

Merged
merged 3 commits into from
Jan 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions shallow_backup/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,15 @@ def backup_fonts(backup_path, skip=False):
overwrite_dir_prompt_if_needed(backup_path, skip)
print_blue("Copying '.otf' and '.ttf' fonts...")
fonts_path = get_fonts_dir()
fonts = [quote(os.path.join(fonts_path, font)) for font in os.listdir(fonts_path) if
font.endswith(".otf") or font.endswith(".ttf")]

for font in fonts:
if os.path.exists(font):
copyfile(font, os.path.join(backup_path, font.split("/")[-1]))
if os.path.isdir(fonts_path):
fonts = [quote(os.path.join(fonts_path, font)) for font in os.listdir(fonts_path) if
font.endswith(".otf") or font.endswith(".ttf")]

for font in fonts:
if os.path.exists(font):
copyfile(font, os.path.join(backup_path, font.split("/")[-1]))


alichtman marked this conversation as resolved.
Show resolved Hide resolved
def backup_all(dotfiles_path, packages_path, fonts_path, configs_path, skip=False):
"""
Complete backup procedure.
Expand Down