mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix missing file error in file.directory.
file.check_perms raises CommandExecutionError with message that starts with 'Path not found' when file or directory was deleted between _depth_limited_walk and actual permissions check. This error was correctly ignored for directories, but not for files. This commit fixes error message check for files.
This commit is contained in:
parent
acfb7d89b4
commit
c10882579f
1 changed files with 1 additions and 1 deletions
|
@ -3155,7 +3155,7 @@ def directory(name,
|
|||
ret, _ = __salt__['file.check_perms'](
|
||||
full, ret, user, group, file_mode, follow_symlinks)
|
||||
except CommandExecutionError as exc:
|
||||
if not exc.strerror.endswith('does not exist'):
|
||||
if not exc.strerror.startswith('Path not found'):
|
||||
errors.append(exc.strerror)
|
||||
|
||||
if check_dirs:
|
||||
|
|
Loading…
Add table
Reference in a new issue