petrbroz / vscode-forge-tools

Visual Studio Code extension for accessing Autodesk Forge services and content.
https://marketplace.visualstudio.com/items?itemName=petrbroz.vscode-forge-tools
MIT License
74 stars 17 forks source link

Fix object upload filepath in Windows #4

Closed albisserAdrian closed 4 years ago

albisserAdrian commented 4 years ago

Check for win32 platform and if so strip the leading / from filepath.

petrbroz commented 4 years ago

Thank you for the heads up @albisserAdrian. I had already fixed the issue in master branch (using .fsPath instead of .path on the Uri object) but the fix didn't make it back to the develop branch. I have just merged the fix into develop as well so this PR should not be needed anymore.

If you think we should use your approach instead, let me know.

albisserAdrian commented 4 years ago

Sorry I didn’t check the master branch. The extension wasn’t working for me so it was just a quick fix but fsPath is definitely the right way of doing it in vs code.

petrbroz commented 4 years ago

No, it was my fault. I forgot to bring the fix into develop, and also I accidentally built the last vscode extension package from develop instead of master, so the fix was not available in production. This should all be fixed now in version 0.13.1.

fsPath is a property of the Uri class. Quoting from https://code.visualstudio.com/api/references/vscode-api#Uri:

The string representing the corresponding file system path of this Uri.

albisserAdrian commented 4 years ago

Haha, no worries. I was wondering where fsPath was coming from, even google didn’t give me any results, but I figured it out with your link to the uri class docs. With the branches the same thing always happened to me, so now I just use master as the develop branch and have a separate one for production. Anyway, thanks for this amazing extension!