[PATCH]Re: The first character disappears

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Atila
Date: Monday, August 24, 2009 - 5:51 am

*
Signed-off-by: Atila <atila.alr@dpf.gov.br>
---
 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
The first character disappears, Markus Suvanto, (Sun Aug 23, 10:17 pm)
Re: The first character disappears, Chris Mason, (Mon Aug 24, 4:52 am)
[PATCH]Re: The first character disappears, Atila, (Mon Aug 24, 5:51 am)
Re: [PATCH]Re: The first character disappears, Markus Suvanto, (Mon Aug 24, 6:52 am)
Re: [PATCH]Re: The first character disappears, Markus Suvanto, (Mon Aug 24, 7:22 am)
Re: [PATCH]Re: The first character disappears, Markus Suvanto, (Mon Aug 24, 9:42 am)
Re: [PATCH]Re: The first character disappears, Sage Weil, (Mon Aug 24, 10:11 am)
Re: [PATCH]Re: The first character disappears, Markus Suvanto, (Tue Aug 25, 1:04 am)
[PATCH] Btrfs: fix arithmetic error in clone ioctl, Sage Weil, (Tue Aug 25, 1:19 pm)
Re: [PATCH] Btrfs: fix arithmetic error in clone ioctl, Markus Suvanto, (Wed Aug 26, 12:19 am)
[PATCH]Re: The first character disappears, Atila, (Thu Aug 27, 10:44 am)