Re: [PATCH]Re: The first character disappears

Markus Suvanto
2009-08-24T13:52:06Z

After this patch against the latest
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstabl=
e.git
bcp don't eat the first character anymore, thanks :)

2009/8/24 Atila <atila.alr@dpf.gov.br>:
> *
> Signed-off-by: Atila <atila.alr@dpf.gov.br>
> ---
> =A0bcp | =A0 =A06 +++---
> =A01 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/bcp b/bcp
> index 5729e91..7c6b351 100755
> --- a/bcp
> +++ b/bcp
> @@ -107,7 +107,7 @@ if src_args > 1:
> =A0 =A0 =A0 =A0 exit(1)
>
> =A0for srci in xrange(0, src_args):
> - =A0 =A0src =3D args[srci]
> + =A0 =A0src =3D args[srci].strip('/')
> =A0 =A0 if os.path.isfile(src):
> =A0 =A0 =A0 =A0 statinfo =3D os.lstat(src)
> =A0 =A0 =A0 =A0 force_name =3D None
> @@ -136,7 +136,7 @@ for srci in xrange(0, src_args):
> =A0 =A0 =A0 =A0 =A0 =A0 srcname =3D os.path.join(dirpath, x)
> =A0 =A0 =A0 =A0 =A0 =A0 statinfo =3D os.lstat(srcname)
>
> - =A0 =A0 =A0 =A0 =A0 =A0if srcname.startswith(src):
> + =A0 =A0 =A0 =A0 =A0 =A0if srcname.startswith(src + '/'):
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 part =3D srcname[len(src) + 1:]
>
> =A0 =A0 =A0 =A0 =A0 =A0 if stat.S_ISLNK(statinfo.st_mode):
> @@ -152,7 +152,7 @@ for srci in xrange(0, src_args):
>
> =A0 =A0 =A0 =A0 for f in filenames:
> =A0 =A0 =A0 =A0 =A0 =A0 srcname =3D os.path.join(dirpath, f)
> - =A0 =A0 =A0 =A0 =A0 =A0if srcname.startswith(src):
> + =A0 =A0 =A0 =A0 =A0 =A0if srcname.startswith(src + '/'):
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 part =3D srcname[len(src) + 1:]
>
> =A0 =A0 =A0 =A0 =A0 =A0 statinfo =3D os.lstat(srcname)
> --
> 1.6.4
>
> *
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html