From bf3dc2bb4c970f0a7afd0a4feb69ae0563b4c1d3 Mon Sep 17 00:00:00 2001 From: r00t Date: Sat, 6 May 2017 11:21:40 -0400 Subject: [PATCH] ...okay. final tagging, promise. that was a legit bug. --- bdisk/bsync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bdisk/bsync.py b/bdisk/bsync.py index c395709..1f6573b 100755 --- a/bdisk/bsync.py +++ b/bdisk/bsync.py @@ -48,7 +48,8 @@ def http(conf): fulldest = '{0}/{1}'.format(httpdir, destpath) parentdir = os.path.split(fulldest)[0] os.makedirs(parentdir, exist_ok = True) - shutil.copy2('{0}/{1}'.format(prepdir, k), '{0}/{1}'.format(httpdir, httpfiles[k])) + if os.path.lexists('{0}/{1}'.format(prepdir, k)): + shutil.copy2('{0}/{1}'.format(prepdir, k), '{0}/{1}'.format(httpdir, httpfiles[k])) for root, dirs, files in os.walk(httpdir): for d in dirs: os.chown(os.path.join(root, d), uid, gid)