Commit c76224fd authored by hengwen's avatar hengwen

Fix path on windows

parent 874761d6
Pipeline #143124 passed with stage
in 5 minutes and 12 seconds
......@@ -7,6 +7,7 @@ import server.restful.model.Dataframe;
import server.restful.model.MapModel;
import server.restful.model.VehicleModel;
import rpc.protobuf.*;
import server.restful.util.Util;
import java.io.FileInputStream;
import java.io.IOException;
......@@ -28,7 +29,12 @@ public class SimulatorService {
this.simulationID = simulationID;
this.mapPath = mapPath;
String filename = mapPath.substring(mapPath.lastIndexOf("/") + 1);
String filename = "";
if (Util.isWindows()){
filename = mapPath.substring(mapPath.lastIndexOf("\\") + 1);
}else{
filename = mapPath.substring(mapPath.lastIndexOf("/") + 1);
}
this.mapName = filename.replace(".osm", "");
ManagedChannelBuilder<?> channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment