From 8116d64d5c11d1783d6f0a9b437bd8794912a0cc Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 10 Mar 2013 09:05:50 -0400 Subject: [PATCH] always filter out lines ending in / --- rsync-vfat.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rsync-vfat.py b/rsync-vfat.py index 90d3072..1a112d4 100755 --- a/rsync-vfat.py +++ b/rsync-vfat.py @@ -14,9 +14,7 @@ def main(argv): if len(args) != 2: sys.stderr.write('Usage: %s [-n] source destination\n' % argv[0]) return -2 - out = sys.stdout - if dry_run: - out = Popen(['grep', '-v', '/$'], stdin=PIPE).stdin + out = Popen(['grep', '-v', '/$'], stdin=PIPE).stdin cmd = ['rsync', '-av%s' % ('n' if dry_run else ''), '--delete', '--modify-window=2'] + args sys.stdout.write(' '.join(cmd) + '\n')