@@ -13,7 +13,7 @@ def owner
13
13
end
14
14
15
15
def owner = ( should )
16
- File . send ( : chown, uid ( should ) , nil , resource [ :path ] )
16
+ File . chown ( uid ( should ) , nil , resource [ :path ] )
17
17
rescue => detail
18
18
raise Puppet ::Error , _ ( "Failed to set owner to '%{should}': %{detail}" ) % { should : should , detail : detail } , detail . backtrace
19
19
end
@@ -27,7 +27,7 @@ def group
27
27
end
28
28
29
29
def group = ( should )
30
- File . send ( : chown, nil , gid ( should ) , resource [ :path ] )
30
+ File . chown ( nil , gid ( should ) , resource [ :path ] )
31
31
rescue => detail
32
32
raise Puppet ::Error , _ ( "Failed to set group to '%{should}': %{detail}" ) % { should : should , detail : detail } , detail . backtrace
33
33
end
@@ -47,8 +47,8 @@ def mode=(should)
47
47
end
48
48
49
49
def set_file_perm ( filename , owner = nil , group = nil , mode = nil )
50
- File . send ( : chown, uid ( owner ) , nil , filename ) if owner
51
- File . send ( : chown, nil , gid ( group ) , filename ) if group
50
+ File . chown ( uid ( owner ) , nil , resource [ :path ] ) if owner
51
+ File . chown ( nil , gid ( group ) , resource [ :path ] ) if group
52
52
File . chmod ( Integer ( '0' + mode ) , filename ) if mode
53
53
end
54
54
end
0 commit comments