Skip to content

Commit a7000d5

Browse files
committed
(PUP-11345) Fully qualify ::File
For consistency, fully qualify ::File as is done elsewhere in the file_impl.
1 parent ee538eb commit a7000d5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/puppet/file_system/file_impl.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,23 @@ def symlink(path, dest, options = {})
130130
end
131131

132132
def symlink?(path)
133-
File.symlink?(path)
133+
::File.symlink?(path)
134134
end
135135

136136
def readlink(path)
137-
File.readlink(path)
137+
::File.readlink(path)
138138
end
139139

140140
def unlink(*paths)
141-
File.unlink(*paths)
141+
::File.unlink(*paths)
142142
end
143143

144144
def stat(path)
145-
File.stat(path)
145+
::File.stat(path)
146146
end
147147

148148
def lstat(path)
149-
File.lstat(path)
149+
::File.lstat(path)
150150
end
151151

152152
def compare_stream(path, stream)
@@ -180,7 +180,7 @@ def replace_file(path, mode = nil)
180180
tempfile_path = tempfile.path
181181
FileUtils.chown(uid, gid, tempfile_path) if uid && gid
182182
chmod(mode, tempfile_path)
183-
File.rename(tempfile_path, path_string(path))
183+
::File.rename(tempfile_path, path_string(path))
184184
ensure
185185
tempfile.close!
186186
end

lib/puppet/file_system/windows.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def replace_file(path, mode = nil)
159159
end
160160

161161
set_dacl(tempfile.path, dacl) if dacl
162-
File.rename(tempfile.path, path_string(path))
162+
::File.rename(tempfile.path, path_string(path))
163163
ensure
164164
tempfile.close!
165165
end

0 commit comments

Comments
 (0)