diff --git a/salt/states/file.py b/salt/states/file.py index 0154317eac..814215c02c 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -1196,6 +1196,10 @@ def directory(name, When 'clean' is set to True, exclude this pattern from removal list and preserve in the destination. ''' + # Remove trailing slash, if present + if name[-1] == '/': + name = name[:-1] + user = _test_owner(kwargs, user=user) if 'mode' in kwargs and not dir_mode: