candera/shadowspawn — Issue #14: Options starting with - are incorrectly interpreted
Author: candera
Created: 2011-11-22 15:04:04+00:00
State: open

A user on the mailing list ([here](http://groups.google.com/group/shadowspawn-tool/browse_thread/thread/13593783c93c791f)) reports the following:

Hi,

While attempting to use ShadowSpawn with Rsync, I discovered a bug
in the parsing of
arguments to .

Viz., Arguments beginning with '-' are interpreted as arguments to
ShadowSpawn itself,
rather than arguments to . ShadowSpawn then fails the
operation, complaining
about an unknown argument.

This can be fixed in COptions.h, as follows:

-if (options._command.empty() && Utilities::StartsWith(arg, TEXT("/"))
|| Utilities::StartsWith(arg, TEXT("-")))

+if (options._command.empty() && (Utilities::StartsWith(arg,
TEXT("/")) || Utilities::StartsWith(arg, TEXT("-"))))

ShadowSpawn can then be successfully used with Rsync.