checkout: check if dirname actually returned directory

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-01-14 22:20:06 +02:00
parent a7dbf70995
commit b73af1f636
+1 -1
View File
@@ -18,7 +18,7 @@ class CmdCheckout(CmdBase):
os.remove(file)
dir = os.path.dirname(file)
if not os.listdir(dir):
if len(dir) != 0 and not os.listdir(dir):
Logger.info(u'Remove empty directory \'{}\''.format(dir))
os.removedirs(dir)
pass