Skip to content

Commit

Permalink
Merge pull request #353 from lacostej/fix/encoding_windows_path
Browse files Browse the repository at this point in the history
u3d/internals: support accentuated characters in Windows Local App Data path. Fixes #352
  • Loading branch information
lacostej authored Apr 11, 2019
2 parents fdaced3 + c9a9396 commit 7b63aff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/u3d/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def windows_local_appdata
result = getdir.call(0, CSIDL_LOCAL_APPDATA, 0, 0, windir)
raise "Unable to get Local Appdata directory, returned with value #{result}" unless result.zero?
windir.rstrip!
windir = windir.encode("UTF-8", Encoding.find('filesystem'))
windir = File.expand_path(windir.rstrip)

return windir if Dir.exist? windir
Expand Down

0 comments on commit 7b63aff

Please sign in to comment.