From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: chris.mason@oracle.com
Cc: linux-btrfs@vger.kernel.org,
Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Subject: [PATCH] bcp: fix off-by-one errors in path handling
Date: Sun, 14 Feb 2010 09:26:55 +0200 [thread overview]
Message-ID: <1266132415-17837-1-git-send-email-eduard.munteanu@linux360.ro> (raw)
This fixes a bug which causes the first character of each filename in
the destination to be omitted.
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
---
bcp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bcp b/bcp
index 5729e91..c6b4bef 100755
--- a/bcp
+++ b/bcp
@@ -137,7 +137,7 @@ for srci in xrange(0, src_args):
statinfo = os.lstat(srcname)
if srcname.startswith(src):
- part = srcname[len(src) + 1:]
+ part = srcname[len(src):]
if stat.S_ISLNK(statinfo.st_mode):
copylink(srcname, dst, part, statinfo, None)
@@ -153,7 +153,7 @@ for srci in xrange(0, src_args):
for f in filenames:
srcname = os.path.join(dirpath, f)
if srcname.startswith(src):
- part = srcname[len(src) + 1:]
+ part = srcname[len(src):]
statinfo = os.lstat(srcname)
copyfile(srcname, dst, part, statinfo, None)
--
1.6.4.4
reply other threads:[~2010-02-14 7:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1266132415-17837-1-git-send-email-eduard.munteanu@linux360.ro \
--to=eduard.munteanu@linux360.ro \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox