-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix invalid path on Windows when opening traces #674
Fix invalid path on Windows when opening traces #674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your commit message needs to be formatted properly and you need to add a correctly formatted signed-off-by line
|
||
@injectable() | ||
export class BackendFileServiceImpl implements BackendFileService { | ||
|
||
async findTraces(path: string, cancellationToken: CancellationToken): Promise<string[]> { | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove trailing whitespaces
a635e09
to
6aaf92f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit message is not formatted properly has to long lines. The main readme has a section about how to contribute code and format the message.
https://github.com/theia-ide/theia-trace-extension#how-to-contribute-code
Please update the commit message accordingly.
Currently, when opening traces on Windows, Theia returns the file path starting with a /. For example, instead of C:/, Theia returns /C://. The path is an invalid Windows path, and prevent the trace extension from opening traces. This is a known issue that requires a work around. This commit resolves this issue by using FileUri to convert the original file path returned by Theia to a platform specific path. This work around will temporarily allow traces to be opened in Windows environment. Signed-off-by: Hoang Thuan Pham <[email protected]>
6f0a20b
to
096c681
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this. Looks good to me.
Fixes #545 |
On Windows, Theia returns an invalid file path when opening traces. The invalid file path begins with a forward slash /. For example, the path C:/ will become /C:/. This prevents the trace extension from opening trace files. This is a known Theia issue. More on the issue can be read here.
This commit resolves temporarily this issue by using FileUri to convert the original file path returned by Theia to a platform specific path. This will allow the trace extension to open traces on Windows.
Signed-off-by: Hoang Thuan Pham <[email protected]>