diff --git a/library/files/file b/library/files/file index ddce2e558f..4ba61f6d53 100644 --- a/library/files/file +++ b/library/files/file @@ -206,7 +206,7 @@ def main(): # refuse to replace a directory that has files in it module.fail_json(path=path, msg='the directory %s is not empty, refusing to convert it' % path) elif prev_state in ['file', 'hard'] and not force: - module.fail_json(path=path, msg='refusing to convert between %s and %s for %s' % (prev_state, state, src)) + module.fail_json(path=path, msg='refusing to convert between %s and %s for %s' % (prev_state, state, path)) if prev_state == 'absent': changed = True