Skip to contentSkip to conversation

cg-fetch: support for active symbols in rsync path

PATCH New Pavel Roskin 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cg-fetch: support for active symbols in rsync path

t9112-fetch-rsync.sh breaks if cogito is located in a directory containing e.g. spaces. The test uses its own rsync replacement (localrsync) and supplies it to cg-fetch with full patch. cg-fetch doesn't quote rsync sufficiently to prevent interpreting the path to localrsync by the shell.

This bug is unlikely to be a problem in real life, but it's important to have cogito tests run properly in directories with unusual names, since it allows to catch a number of more serious problems.

cg-fetch +1 -1
index 8fa34ce..6dfd02f 100755
@@ -102,7 +102,7 @@ get_rsync()
 		shift
 	fi
 
-	eval ${RSYNC:-rsync} $RSYNC_FLAGS $rsync_flags_l -v -Lr \
+	eval '"${RSYNC:-rsync}"' $RSYNC_FLAGS $rsync_flags_l -v -Lr \
 		"$1$appenduri" "$2$appenduri" $redir | $filter
 	return ${PIPESTATUS[0]}
 }
Signature · 2 lines
Regards,
Pavel Roskin