equal
deleted
inserted
replaced
256 head, tail = os.path.split(name) |
256 head, tail = os.path.split(name) |
257 if not tail: |
257 if not tail: |
258 head, tail = os.path.split(head) |
258 head, tail = os.path.split(head) |
259 while head and tail: |
259 while head and tail: |
260 try: |
260 try: |
261 if osutil.listdir(name): |
261 if osutil.listdir(head): |
262 return |
262 return |
263 os.rmdir(head) |
263 os.rmdir(head) |
264 except: |
264 except: |
265 break |
265 break |
266 head, tail = os.path.split(head) |
266 head, tail = os.path.split(head) |