From 63ea306c18fa36af8d82c0ef60c8bad864418e81 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Fri, 1 Jul 2011 23:37:39 +1000 Subject: [PATCH] Don't sync to folders that don't exist --- libnotipod.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnotipod.py b/libnotipod.py index 3e30e4d..7f1a6b0 100644 --- a/libnotipod.py +++ b/libnotipod.py @@ -197,6 +197,8 @@ def sync(dry_run, source, dest, files_to_copy): filemap[sf.encoded_filename.lower()] = sf files_to_copy = set(filemap) + if not os.path.isdir(dest): + raise OSError("No such file or directory: '%s'" % dest) for dirpath, dirnames, filenames in os.walk(dest): full_dirpath = dirpath dirpath = strip_prefix(dirpath, dest) -- 2.39.2