fix: custom profile dir relative to profile dir
This commit is contained in:
parent
3df98310fb
commit
8327fd4e24
3 changed files with 5 additions and 2 deletions
|
@ -130,7 +130,8 @@ public class RouteServer extends Thread
|
|||
|
||||
ServiceContext serviceContext = new ServiceContext();
|
||||
serviceContext.segmentDir = args[0];
|
||||
System.setProperty( "profileBaseDir", args[1] );
|
||||
serviceContext.profileDir = args[1];
|
||||
System.setProperty( "profileBaseDir", serviceContext.profileDir );
|
||||
serviceContext.customProfileDir = args[2];
|
||||
|
||||
int maxthreads = Integer.parseInt( args[4] );
|
||||
|
|
|
@ -11,6 +11,7 @@ import btools.router.OsmNodeNamed;
|
|||
public class ServiceContext
|
||||
{
|
||||
public String segmentDir;
|
||||
public String profileDir;
|
||||
public String customProfileDir;
|
||||
public Map<String,String> profileMap = null;
|
||||
public List<OsmNodeNamed> nogoList;
|
||||
|
|
|
@ -53,7 +53,8 @@ public class ProfileUploadHandler
|
|||
|
||||
private File getOrCreateCustomProfileDir()
|
||||
{
|
||||
File customProfileDir = new File(serviceContext.customProfileDir);
|
||||
// workaround: customProfileDir relative to profileDir, because RoutingEngine doesn't know custom profiles
|
||||
File customProfileDir = new File(serviceContext.profileDir, serviceContext.customProfileDir);
|
||||
if (!customProfileDir.exists())
|
||||
{
|
||||
customProfileDir.mkdir();
|
||||
|
|
Loading…
Reference in a new issue