Merge pull request #43151 from ushmodin/2016.11

state.sls hangs on file.recurse with clean: True on windows
This commit is contained in:
Mike Place 2017-08-23 11:25:32 -06:00 committed by GitHub
commit 669b376abf

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):