equal
deleted
inserted
replaced
371 |
371 |
372 def unlink(f): |
372 def unlink(f): |
373 """unlink and remove the directory if it is empty""" |
373 """unlink and remove the directory if it is empty""" |
374 os.unlink(f) |
374 os.unlink(f) |
375 # try removing directories that might now be empty |
375 # try removing directories that might now be empty |
376 try: os.removedirs(os.path.dirname(f)) |
376 try: |
377 except: pass |
377 os.removedirs(os.path.dirname(f)) |
|
378 except OSError: |
|
379 pass |
378 |
380 |
379 def copyfiles(src, dst, hardlink=None): |
381 def copyfiles(src, dst, hardlink=None): |
380 """Copy a directory tree using hardlinks if possible""" |
382 """Copy a directory tree using hardlinks if possible""" |
381 |
383 |
382 if hardlink is None: |
384 if hardlink is None: |