summaryrefslogtreecommitdiff
path: root/lib/chef/resource/windows_font.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/windows_font.rb')
-rw-r--r--lib/chef/resource/windows_font.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_font.rb b/lib/chef/resource/windows_font.rb
index 54e1c9669a..8fea06f0de 100644
--- a/lib/chef/resource/windows_font.rb
+++ b/lib/chef/resource/windows_font.rb
@@ -98,8 +98,9 @@ class Chef
def font_exists?
require "win32ole" if RUBY_PLATFORM.match?(/mswin|mingw32|windows/)
fonts_dir = WIN32OLE.new("WScript.Shell").SpecialFolders("Fonts")
+ fonts_dir_local = Chef::Util::PathHelper.join(ENV["home"], "AppData/Local/Microsoft/Windows/fonts")
logger.trace("Seeing if the font at #{Chef::Util::PathHelper.join(fonts_dir, new_resource.font_name)} exists")
- ::File.exist?(Chef::Util::PathHelper.join(fonts_dir, new_resource.font_name))
+ ::File.exist?(Chef::Util::PathHelper.join(fonts_dir, new_resource.font_name)) || ::File.exist?(Chef::Util::PathHelper.join(fonts_dir_local, new_resource.font_name))
end
# Parse out the schema provided to us to see if it's one we support via remote_file.