Skip to content

Commit

Permalink
u3d/internals: support accentuated characters in Windows Local App Da…
Browse files Browse the repository at this point in the history
…ta path. Fixes #352
  • Loading branch information
lacostej committed Mar 22, 2019
1 parent fdaced3 commit c9a9396
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 c9a9396

Please sign in to comment.