shared profile dir

This commit is contained in:
Arndt Brenschede 2018-10-21 11:50:58 +02:00
parent 940abc5ea2
commit b154851f1f
4 changed files with 11 additions and 1 deletions

View file

@ -22,6 +22,7 @@ public class ProfileUploadHandler
// prefix for custom profile id to distinguish from default profiles
public static final String CUSTOM_PREFIX = "custom_";
public static final String SHARED_PREFIX = "shared_";
private ServiceContext serviceContext;

View file

@ -51,6 +51,11 @@ public class ServerHandler extends RequestHandler {
String customProfile = profile.substring( ProfileUploadHandler.CUSTOM_PREFIX.length() );
profile = new File( serviceContext.customProfileDir, customProfile ).getPath();
}
else if ( profile.startsWith( ProfileUploadHandler.SHARED_PREFIX ) )
{
String customProfile = profile.substring( ProfileUploadHandler.SHARED_PREFIX.length() );
profile = new File( serviceContext.sharedProfileDir, customProfile ).getPath();
}
rc.localFunction = profile;
rc.setAlternativeIdx(Integer.parseInt(params.get( "alternativeidx" )));