mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix file.recurse with clean: True
This commit is contained in:
parent
3487d761a2
commit
ecad616d08
1 changed files with 2 additions and 2 deletions
|
@ -416,7 +416,7 @@ 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 ['/', ''.join([os.path.splitdrive(fn_)[0], '\\\\'])]:
|
||||
break
|
||||
|
||||
def _delete_not_kept(nfn):
|
||||
|
@ -2458,7 +2458,7 @@ def recurse(name,
|
|||
merge_ret(path, _ret)
|
||||
return
|
||||
else:
|
||||
os.remove(path)
|
||||
__salt__['file.remove'](path)
|
||||
_ret['changes'] = {'diff': 'Replaced file with a directory'}
|
||||
merge_ret(path, _ret)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue