Fix missing parameter to endswith and pass paths through normpath to remove
any duplicate "/" characters which would corrupt other calls like basename.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
return ss
def sstate_add(ss, source, dest, d):
- srcbase = os.path.basename(source)
- if not source.endswith:
+ if not source.endswith("/"):
source = source + "/"
- if not dest.endswith:
+ if not dest.endswith("/"):
dest = dest + "/"
+ source = os.path.normpath(source)
+ dest = os.path.normpath(dest)
+ srcbase = os.path.basename(source)
ss['dirs'].append([srcbase, source, dest])
return ss