Excluding relative dirs in state.file.retention_schedule

This commit should resolve #48637
This commit is contained in:
slaws 2018-07-18 23:00:10 +02:00
parent 0d4c80205f
commit 5539eff39e
No known key found for this signature in database
GPG key ID: 42476DC1AC9B1386

View file

@ -3737,6 +3737,8 @@ def retention_schedule(name, retain, strptime_format=None, timezone=None):
return (None, None)
def get_file_time_from_mtime(f):
if f == '.' or f == '..':
return (None,None)
lstat = __salt__['file.lstat'](os.path.join(name, f))
if lstat:
mtime = lstat['st_mtime']