state.sls hangs on file.recurse with clean: True on windows

This commit is contained in:
Ushmodin Nikolay 2017-08-23 22:43:04 +07:00
parent 923f9741fe
commit c5841e2ade

View file

@ -446,7 +446,11 @@ def _clean_dir(root, keep, exclude_pat):
while True:
fn_ = os.path.dirname(fn_)
real_keep.add(fn_)
if fn_ in ['/', ''.join([os.path.splitdrive(fn_)[0], '\\\\'])]:
if fn_ in [
os.sep,
''.join([os.path.splitdrive(fn_)[0], os.sep]),
''.join([os.path.splitdrive(fn_)[0], os.sep, os.sep])
]:
break
def _delete_not_kept(nfn):