@@ -130,7 +130,7 @@ private void prepareStudio()
130
130
131
131
serverConfiguration .network .protocols .add (httpProtocol );
132
132
133
- Path studioPath = Paths . get (studioProperties .getPath ()).resolve ("studio" );
133
+ Path studioPath = resolvePath (studioProperties .getPath ()).resolve ("studio" );
134
134
if (Files .exists (studioPath ))
135
135
{
136
136
logger .info (String .format ("OrientDB Studio is already available at [%s], skipping initialization. %n" +
@@ -178,6 +178,11 @@ private void prepareStudio()
178
178
}
179
179
}
180
180
181
+ protected Path resolvePath (String path )
182
+ {
183
+ return Paths .get (path ).toAbsolutePath ().normalize ();
184
+ }
185
+
181
186
private void init ()
182
187
throws Exception
183
188
{
@@ -223,12 +228,13 @@ private void init()
223
228
224
229
System .setProperty ("ORIENTDB_ROOT_PASSWORD" , serverProperties .getPassword ());
225
230
231
+ String serverDatabasePath = resolvePath (serverProperties .getPath ()).toString ();
226
232
// add other properties
227
233
List <OServerEntryConfiguration > properties = new LinkedList <>();
228
- properties .add (buildProperty ("server.database.path" , serverProperties . getPath () ));
234
+ properties .add (buildProperty ("server.database.path" , serverDatabasePath ));
229
235
properties .add (buildProperty ("plugin.dynamic" , "false" ));
230
236
properties .add (buildProperty ("log.console.level" , "info" ));
231
- properties .add (buildProperty ("orientdb.www.path" , studioProperties . getPath () ));
237
+ properties .add (buildProperty ("orientdb.www.path" , serverDatabasePath ));
232
238
233
239
serverConfiguration .network = networkConfiguration ;
234
240
serverConfiguration .users = users .toArray (new OServerUserConfiguration [users .size ()]);
0 commit comments