On Wed, 2009-02-18 at 17:28 +0100, Pierre Ynard wrote:
> Hello,
> 
> I noticed that the new versions of pcp introduce nicer parsing behavior.
> However, I am somewhat confused as it seems to produce incoherent
> results in some cases. For example, given an existing /baz directory on
> the device:
> 
>  - "pcp foo/bar :/baz/" copies bar to /baz/bar on the device
> 
>  - "pcp ./bar :/baz/" copies bar to /baz/bar on the device
> 
>  - "pcp bar :/baz/" attempts to copy bar into /baz on the device.
>    If bar is a file, it logically fails since /baz already exists as
>    a directory.
>    If bar is a directory, then its contents are spilled among those of
>    /baz
> 
> In the last case, I would typically expect pcp to copy bar to /baz/bar
> instead. So I am not sure that the current behavior is intended, and if
> it is, I would love to hear some rational about it. Included below is a
> patch that restores the expected behavior.
> 
> 
> --- tools/pcp.c       2009-02-18 14:57:09.000000000 +0100
> +++ tools/pcp.c       2009-02-18 14:47:20.000000000 +0100
> @@ -494,7 +494,7 @@
>        if (p)
>       name = strdup(p+1);
>        else
> -     name = strdup("");
> +     name = strdup(path);
>      }
>    return name;
>  }
> 
> 
> Regards,
> 

Thanks for that, works much better. Patch committed.

Ta
Mark

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to