mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-12-02 15:28:29 +01:00
checkout: check if dirname actually returned directory
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user