if d[-1] == '/':
d = d[:-1]
tail = os.path.split(d)[-1]
- copytree(d, os.path.join(mount_point, tail))
+ if (os.path.isdir(d)):
+ copytree(d, os.path.join(mount_point, tail))
+ else:
+ copy(d, os.path.join(mount_point, tail))
call(['hdiutil','detach',mount_point])
call(['hdiutil','convert',rwdmg,'-format','UDZO','-o',dmg])