Re: [PATCH]Re: The first character disappears

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


2009/8/24 Atila <atila.alr@xxxxxxxxxx>:
> *
> Signed-off-by: Atila <atila.alr@xxxxxxxxxx>
> ---
>  bcp |    6 +++---
>  1 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:
>         exit(1)
>
>  for srci in xrange(0, src_args):
> -    src = args[srci]
> +    src = args[srci].strip('/')
>     if os.path.isfile(src):
>         statinfo = os.lstat(src)
>         force_name = None
> @@ -136,7 +136,7 @@ for srci in xrange(0, src_args):
>             srcname = os.path.join(dirpath, x)
>             statinfo = os.lstat(srcname)
>
> -            if srcname.startswith(src):
> +            if srcname.startswith(src + '/'):
>                 part = srcname[len(src) + 1:]
>
>             if stat.S_ISLNK(statinfo.st_mode):
> @@ -152,7 +152,7 @@ for srci in xrange(0, src_args):
>
>         for f in filenames:
>             srcname = os.path.join(dirpath, f)
> -            if srcname.startswith(src):
> +            if srcname.startswith(src + '/'):
>                 part = srcname[len(src) + 1:]
>
>             statinfo = 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux