Skip to content

Commit

Permalink
Remove work-around that formats trace path on Windows
Browse files Browse the repository at this point in the history
Previously, a work-around was implemented to format the path of traces
so that they can be opened on Windows using the Theia Trace Server
Extension. Now that Theia always returns a path in the format of the
user's platform, the work-around is no longer needed.

Change-Id: I046f59b0921c194a78ff270b64be82cdadeab6f6
Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/204839
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
hoangphamEclipse authored and bhufmann committed Oct 10, 2023
1 parent a4a29be commit 25b8360
Showing 1 changed file with 0 additions and 12 deletions.
Expand Up @@ -87,8 +87,6 @@
@Tag(name = EndpointConstants.TRA)
public class TraceManagerService {

private static final boolean IS_WINDOWS = System.getProperty("os.name").contains("Windows"); //$NON-NLS-1$ //$NON-NLS-2$

private static final Map<UUID, IResource> TRACES = Collections.synchronizedMap(initTraces());

private static final String TRACES_FOLDER = "Traces"; //$NON-NLS-1$
Expand Down Expand Up @@ -169,16 +167,6 @@ public Response putTrace(@RequestBody(content = {
}
String name = (String) parameters.get("name"); //$NON-NLS-1$
String path = (String) parameters.get("uri"); //$NON-NLS-1$
if (IS_WINDOWS && path != null && path.startsWith("/")) { //$NON-NLS-1$
/*
* Workaround for path created by the theia-trace-extension, see
* https://github.com/theia-ide/theia-trace-extension/issues/545.
* This is caused by
* https://github.com/eclipse-theia/theia/issues/8098. Once issue
* #8098 is resolved this workaround can be removed.
*/
path = path.substring(1);
}
Object typeIDObject = parameters.get("typeID"); //$NON-NLS-1$
String typeID = typeIDObject != null ? (String) typeIDObject : ""; //$NON-NLS-1$

Expand Down

0 comments on commit 25b8360

Please sign in to comment.