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
4618b433e9
commit
d328ec0157
1 changed files with 2 additions and 2 deletions
|
@ -420,7 +420,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):
|
||||
|
@ -2403,7 +2403,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