either it is config file or not... remove empty dirs

This commit is contained in:
Faik Uygur
2009-08-25 08:55:40 +00:00
parent 29a30bceb2
commit 798400645c
+5 -5
View File
@@ -564,11 +564,11 @@ class Remove(AtomicOperation):
ctx.ui.warning(_('Installed file %s does not exist on system [Probably you manually deleted]') % fpath)
return
# remove emptied directories
dpath = os.path.dirname(fpath)
while dpath != '/' and not os.listdir(dpath):
os.rmdir(dpath)
dpath = os.path.dirname(dpath)
# remove emptied directories
dpath = os.path.dirname(fpath)
while dpath != '/' and not os.listdir(dpath):
os.rmdir(dpath)
dpath = os.path.dirname(dpath)
def run_preremove(self):
if ctx.comar: