mercurial/windows.py
changeset 9572 1f665246dab3
parent 9448 bc6b0fef9495
child 9576 c156bf947e26
child 9591 012f1244cd4c
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)