equal
deleted
inserted
replaced
265 head, tail = os.path.split(name) |
265 head, tail = os.path.split(name) |
266 if not tail: |
266 if not tail: |
267 head, tail = os.path.split(head) |
267 head, tail = os.path.split(head) |
268 while head and tail: |
268 while head and tail: |
269 try: |
269 try: |
270 if osutil.listdir(name): |
270 if osutil.listdir(head): |
271 return |
271 return |
272 os.rmdir(head) |
272 os.rmdir(head) |
273 except: |
273 except: |
274 break |
274 break |
275 head, tail = os.path.split(head) |
275 head, tail = os.path.split(head) |