def zip_path(path, base, zipfd):
paths = os.listdir(path)
for p in paths:
- if os.path.isdir(p):
+ if os.path.isdir(os.path.join(path, p)):
zip_path(os.path.join(path, p), os.path.join(base, p), zipfd)
else:
zipfd.write(os.path.join(path, p), os.path.join(base, p))