Commit d583b611 authored by Christophe Dumez's avatar Christophe Dumez

- use os.path.basename instead of doing it manually


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7230 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 26a1e753
......@@ -111,7 +111,7 @@ class File :
def __init__(self, full_path, msg_status) :
self.full_path = full_path
self.msg_status = msg_status
self.name = full_path.split(os.sep)[-1]
self.name = os.path.basename(full_path)
## End of File Class
class Dir :
......@@ -119,7 +119,7 @@ class Dir :
def __init__(self, full_path, msg_status) :
self.full_path = full_path
self.msg_status = msg_status
self.name = full_path.split(os.sep)[-1]
self.name = os.path.basename(full_path)
self.sub_dirs = [] # list of sub directories
# return a list of sub directories' names
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment