merge-recursive::removeFile: remove empty directories
When the last file in a directory is removed as the result of a merge, try to rmdir the now-empty directory. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
397c76697f
commit
80e21a9ed8
@ -293,6 +293,10 @@ def removeFile(clean, path):
|
||||
except OSError, e:
|
||||
if e.errno != errno.ENOENT and e.errno != errno.EISDIR:
|
||||
raise
|
||||
try:
|
||||
os.removedirs(os.path.dirname(path))
|
||||
except:
|
||||
pass
|
||||
|
||||
def uniquePath(path, branch):
|
||||
def fileExists(path):
|
||||
|
Loading…
Reference in New Issue
Block a user