SPARK-1184

Every time spark launches it will search for the USER_SPARK_HOME if this location does not exist it will attempt to copy the old USER_SPARK_HOME into the new location skipping over the plugins directory. 

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12034 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Mike McMahon
2011-02-25 21:42:27 +00:00
committed by mikemcmahon
parent 760ded2a29
commit 6101dcf5d0
2 changed files with 131 additions and 1 deletions

View File

@ -26,6 +26,8 @@ import java.awt.EventQueue;
import java.awt.Font;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.HashSet;
import java.util.Locale;
import javax.swing.BorderFactory;
@ -87,7 +89,18 @@ public final class Spark {
StringBuffer buf = new StringBuffer();
buf.append(current);
buf.append(";");
SparkCompatibility sparkCompat = new SparkCompatibility();
try {
// Absolute paths to a collection of files or directories to skip
Collection<String> skipFiles = new HashSet<String>();
skipFiles.add(new File(USER_SPARK_HOME, "/plugins").getAbsolutePath());
sparkCompat.transferConfig(USER_SPARK_HOME, skipFiles);
} catch (IOException e) {
// Do nothing
}
RESOURCE_DIRECTORY = new File(USER_SPARK_HOME, "/resources").getAbsoluteFile();
if(!RESOURCE_DIRECTORY.exists()){