Mercurial > public > mercurial-scm > hg
comparison mercurial/windows.py @ 9572:1f665246dab3
windows: fix unlink() not dropping empty tree (issue1861)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 08 Oct 2009 23:32:36 +0200 |
parents | bc6b0fef9495 |
children | c156bf947e26 012f1244cd4c |
comparison
equal
deleted
inserted
replaced
9532:989cb39d1df4 | 9572:1f665246dab3 |
---|---|
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) |