[Csync2] -f not working as documented? (again)

Martin Leben martin at leben.nu
Sat Jan 14 14:51:49 CET 2012


On 01/14/12 13:02, Lars Ellenberg wrote:
> On Mon, Jan 09, 2012 at 12:21:23AM +0100, Martin Leben wrote:
>>
>> I use csync2 1.34 on debian squeeze in a group of two nodes. Some
>> files are marked dirty on both nodes. Trying to resolve this by
>> using the "-f" flag on one of the nodes doesn't work. Trying on the
>> other doesn't work either.
>
> Yours is related to prefix substitution,
> and it looks like [...]
>
> does not really use the pfname as it should:
>
> diff --git a/csync2.c b/csync2.c
> index b8bf552..1693329 100644
> --- a/csync2.c
> +++ b/csync2.c
> @@ -773,12 +773,12 @@ found_a_group:;
>  					else
>  						ASPRINTF(&where_rec, "or (filename > '%s/' "
>  							"and filename < '%s0')",
> -							url_encode(realname), url_encode(realname));
> +							url_encode(pfname), url_encode(pfname));
>  				}
>
>  				SQL("Mark file as to be forced",
>  					"UPDATE dirty SET forced = 1 WHERE filename = '%s' %s",
> -					url_encode(realname), where_rec);
> +					url_encode(pfname), where_rec);
>
>  				if ( recursive )
>  					free(where_rec);

Thanks! :-)

/Martin


More information about the Csync2 mailing list