[sysadmin-bin] ftpadmin: correctly determine basedir for Solaris tar files



commit c963f5651fb33f61edd39f8eeae81102468e9930
Author: Olav Vitters <olav vitters nl>
Date:   Fri Apr 8 22:05:03 2011 +0200

    ftpadmin: correctly determine basedir for Solaris tar files

 ftpadmin |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/ftpadmin b/ftpadmin
index 6f59582..19014ce 100755
--- a/ftpadmin
+++ b/ftpadmin
@@ -334,7 +334,7 @@ class TarInfo(BasicInfo):
                     if info.isdir():
                         uniq_dir = "%s/" % info.name
                     else:
-                        uniq_dir = "%s/" % os.path.basename(info.name.replace("/",os.sep)) if "/" in info.name else None
+                        uniq_dir = "%s/" % os.path.dirname(info.name.replace("/",os.sep)) if "/" in info.name else None
                 elif uniq_dir is not None and not info.name.startswith(uniq_dir):
                     uniq_dir = None
                 if progress:



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