Sure, I’ll add it to the Issue Tracker.
I had hope for the working directory idea, but it does not work. Looks like SketchUp is changing the folder to /SketchUp/Plugins on startup.
I need to make this work seamlessly and not needing to ask the user for a non-unicode path for these “behind the scene” things. I will make it possible to change the path used, as a hidden(registry) feature in our software, so we can help the few having problems. Still it would be better if the issue was fixed, I guess it is simple. Strangely enough it is possible add a project file as parameter to open it even if the path contains non-unicode parameters, so in that much more common case, it is handled correctly.
Thanks for the ideas for workarounds anyway!
Yes, apparently whilst the “Plugins” path is being processed (extensions loaded) it is set as the working directory. Then when loading is complete it’s changed to the user “Documents” path.
This is why our code should never assume what the working directory will be. We’ve long advocated that the block form of the Dir::chdir be used to temporarily change the working directory and have it automatically restored when the block returns. Ie …
Dir.chdir(my_path) do
# code
end
# previous working directory is restored