mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
use abspath, do not eliminating symlinks
realpath will eliminating symlinks, so following sls won't work as expected /root/a: file.directory: - user: root - group: root - mode: 0755 - clean: True - require: - file: /root/a/b /root/a/b: file.symlink: - user: root - group: root - target: /etc
This commit is contained in:
parent
f3ca682f92
commit
fb32c32065
1 changed files with 2 additions and 2 deletions
|
@ -321,8 +321,8 @@ def _gen_keep_files(name, require):
|
|||
'''
|
||||
Check whether ``path`` is child of ``directory``
|
||||
'''
|
||||
path = os.path.realpath(path)
|
||||
directory = os.path.realpath(directory)
|
||||
path = os.path.abspath(path)
|
||||
directory = os.path.abspath(directory)
|
||||
|
||||
relative = os.path.relpath(path, directory)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue