Skip to content

Commit

Permalink
Merge pull request #225 from 'melissalinkert/9308-config-paths'
Browse files Browse the repository at this point in the history
Note: This closes gh-225 but also includes
melissalinkert/gh-2 which Jean-Marie opened.
I've manually merged them altogether here
since I don't have access to Melissa's repo.
  • Loading branch information
joshmoore committed Jul 10, 2012
2 parents 9c9078c + 6678bb4 commit 93f7a55
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,14 @@ public String getConfigFileRelative()
*/
public String getConfigFileRelative(String file)
{
StringBuffer relPath = new StringBuffer(CONFIG_DIR);
if (IOUtil.isJavaWebStart() && UIUtilities.isWindowsOS())
relPath.append("/");
else relPath.append(File.separatorChar);
relPath.append(file);
return relPath.toString();
if (IOUtil.isJavaWebStart()) {
StringBuffer relPath = new StringBuffer(CONFIG_DIR);
if (UIUtilities.isWindowsOS()) relPath.append("/");
else relPath.append(File.separatorChar);
relPath.append(file);
return relPath.toString();
}
return resolveFilePath(file, CONFIG_DIR);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
package org.openmicroscopy.shoola.env.init;

//Java imports
import java.io.File;
import java.util.Iterator;
import java.util.List;

Expand Down Expand Up @@ -123,8 +124,8 @@ private void createAgent(AgentInfo info, int value)
private Registry createAgentRegistry(String configFile)
throws Exception
{
String relPathName = container.getConfigFileRelative(configFile);
Registry agentReg = RegistryFactory.makeNew(relPathName),
String pathName = container.getConfigFileRelative(configFile);
Registry agentReg = RegistryFactory.makeNew(pathName),
containerReg = container.getRegistry();
RegistryFactory.linkEventBus(containerReg.getEventBus(), agentReg);
RegistryFactory.linkLogger(containerReg.getLogger(), agentReg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,3 @@ void execute()
void rollback() {}

}

0 comments on commit 93f7a55

Please sign in to comment.