- out = new FileOutputStream(new File(tmpConfig, "config.properties"));
- Properties props = new Properties();
- props.setProperty("CACHE_DIR", tmpCache.getAbsolutePath());
- props.store(out, null);
- } finally {
- if (out != null) {
- out.close();
+ File tmpConfig = tempFiles.createTempDir("fanfix-config");
+ File tmpCache = tempFiles.createTempDir("fanfix-cache");
+
+ FileOutputStream out = null;
+ try {
+ out = new FileOutputStream(new File(tmpConfig,
+ "config.properties"));
+ Properties props = new Properties();
+ props.setProperty("CACHE_DIR", tmpCache.getAbsolutePath());
+ props.store(out, null);
+ } finally {
+ if (out != null) {
+ out.close();
+ }