{"action":"created","issue":{"url":"https://api.github.com/repos/SketchUp/api-issue-tracker/issues/135","repository_url":"https://api.github.com/repos/SketchUp/api-issue-tracker","labels_url":"https://api.github.com/repos/SketchUp/api-issue-tracker/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/SketchUp/api-issue-tracker/issues/135/comments","events_url":"https://api.github.com/repos/SketchUp/api-issue-tracker/issues/135/events","html_url":"https://github.com/SketchUp/api-issue-tracker/issues/135","id":372540977,"node_id":"MDU6SXNzdWUzNzI1NDA5Nzc=","number":135,"title":"Sketchup.temp_dir returns short names on windows","user":{"login":"tdapper","id":6338927,"node_id":"MDQ6VXNlcjYzMzg5Mjc=","avatar_url":"https://avatars3.githubusercontent.com/u/6338927?v=4","gravatar_id":"","url":"https://api.github.com/users/tdapper","html_url":"https://github.com/tdapper","followers_url":"https://api.github.com/users/tdapper/followers","following_url":"https://api.github.com/users/tdapper/following{/other_user}","gists_url":"https://api.github.com/users/tdapper/gists{/gist_id}","starred_url":"https://api.github.com/users/tdapper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdapper/subscriptions","organizations_url":"https://api.github.com/users/tdapper/orgs","repos_url":"https://api.github.com/users/tdapper/repos","events_url":"https://api.github.com/users/tdapper/events{/privacy}","received_events_url":"https://api.github.com/users/tdapper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-22T14:19:18Z","updated_at":"2018-10-23T08:45:18Z","closed_at":null,"author_association":"NONE","body":"When using `Sketchup.temp_dir` on Windows and the path has a folder component that does not comply with the 8.3 naming scheme, it returns the short name (e.g. `C:\\Users\\MyLongUsername\\AppData\\Local\\Temp` becomes `C:\\Users\\MYLONG~1\\AppData\\Local\\Temp`).\r\n\r\nThis can cause all sorts of problems e.g. when comparing this path with paths from other sources that don't have this problem.\r\n\r\nThe problem might come from the underlying integration of Ruby or general use of the Win32 API, because using regular Ruby functions such as `Dir.mktmpdir()` produce the same problem.\r\n\r\nSketchUp 2018\r\nWindows\r\n\r\nAlso see: https://stackoverflow.com/questions/52872069/how-to-convert-ruby-string-encoding-to-win32-and-back"},"comment":{"url":"https://api.github.com/repos/SketchUp/api-issue-tracker/issues/comments/432154749","html_url":"https://github.com/SketchUp/api-issue-tracker/issues/135#issuecomment-432154749","issue_url":"https://api.github.com/repos/SketchUp/api-issue-tracker/issues/135","id":432154749,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjE1NDc0OQ==","user":{"login":"tdapper","id":6338927,"node_id":"MDQ6VXNlcjYzMzg5Mjc=","avatar_url":"https://avatars3.githubusercontent.com/u/6338927?v=4","gravatar_id":"","url":"https://api.github.com/users/tdapper","html_url":"https://github.com/tdapper","followers_url":"https://api.github.com/users/tdapper/followers","following_url":"https://api.github.com/users/tdapper/following{/other_user}","gists_url":"https://api.github.com/users/tdapper/gists{/gist_id}","starred_url":"https://api.github.com/users/tdapper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdapper/subscriptions","organizations_url":"https://api.github.com/users/tdapper/orgs","repos_url":"https://api.github.com/users/tdapper/repos","events_url":"https://api.github.com/users/tdapper/events{/privacy}","received_events_url":"https://api.github.com/users/tdapper/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T08:45:18Z","updated_at":"2018-10-23T08:45:18Z","author_association":"NONE","body":"You are right, it certainly does look a little messy. I checked the environment as suggested and it indeed already contains the short names. The temporary folder detection in Python appears to do the same thing (return the short path). \r\n\r\nThis makes it look like it's not a SketchUp issue. One could perhaps argue, that it would be cleaner if Ruby would call the Win32 `GetLongPathName()` function internally, but then again there are probably also reasons against that (even though it looks like that is what `Etc.systmpdir` does).\r\n\r\nNot sure what to say other than that I would kinda implicitly expect the Sketchup API function not to bother with legacy 8.3 file name conventions. That is also what @thomthom appears to expect when he suggested to use it. So I'd tend to lean towards changing that behavior on the SketchUp-side from a user expectation point of view. It might break stuff in some rare cases, though."}}
{"actor":{"display_login":"tdapper"}}