Skip to content

Commit

Permalink
0001437: Multi-homed temp file system should be keyed by engine name …
Browse files Browse the repository at this point in the history
…to prevent collisions
  • Loading branch information
mhanes committed Oct 10, 2013
1 parent 11567c1 commit b251bc5
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -20,6 +20,7 @@
*/
package org.jumpmind.symmetric.service.impl;

import java.io.File;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
Expand Down Expand Up @@ -129,7 +130,14 @@ public String getString(String key) {
}

public String getTempDirectory() {
return getString("java.io.tmpdir", System.getProperty("java.io.tmpdir"));
String engineName = this.getEngineName();
String tmpDirBase = getString("java.io.tmpdir", System.getProperty("java.io.tmpdir"));

if (StringUtils.trimToNull(engineName) == null) {
return tmpDirBase;
} else {
return tmpDirBase+File.separator+engineName;
}
}

protected abstract TypedProperties rereadApplicationParameters();
Expand Down

0 comments on commit b251bc5

Please sign in to comment.