either it is config file or not... remove empty dirs
This commit is contained in:
@@ -564,11 +564,11 @@ class Remove(AtomicOperation):
|
|||||||
ctx.ui.warning(_('Installed file %s does not exist on system [Probably you manually deleted]') % fpath)
|
ctx.ui.warning(_('Installed file %s does not exist on system [Probably you manually deleted]') % fpath)
|
||||||
return
|
return
|
||||||
|
|
||||||
# remove emptied directories
|
# remove emptied directories
|
||||||
dpath = os.path.dirname(fpath)
|
dpath = os.path.dirname(fpath)
|
||||||
while dpath != '/' and not os.listdir(dpath):
|
while dpath != '/' and not os.listdir(dpath):
|
||||||
os.rmdir(dpath)
|
os.rmdir(dpath)
|
||||||
dpath = os.path.dirname(dpath)
|
dpath = os.path.dirname(dpath)
|
||||||
|
|
||||||
def run_preremove(self):
|
def run_preremove(self):
|
||||||
if ctx.comar:
|
if ctx.comar:
|
||||||
|
|||||||
Reference in New Issue
Block a user