mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
fixed nullpointer in StringUtils
fixed restarter on Ubuntu spark.file is in spark_home/bin/ not in spark_home/ git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12218 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
wolf.posdorfer
parent
de90ae3c33
commit
033d7bf0f3
@ -349,7 +349,23 @@ public final class MainWindow extends ChatFrame implements ActionListener {
|
||||
command = starterExe + " \"" + sparkExe + "\"";
|
||||
}
|
||||
else if (Spark.isLinux()) {
|
||||
File f = Spark.getBinDirectory().getParentFile() ;
|
||||
String[] list = f.list();
|
||||
boolean contains =false;
|
||||
for(String s : list)
|
||||
{
|
||||
if (s.equals("spark"))
|
||||
{
|
||||
contains=true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(contains){
|
||||
command = Spark.getBinDirectory().getParentFile().getCanonicalPath() + File.separator + "spark";
|
||||
}
|
||||
else{
|
||||
command = Spark.getBinDirectory().getCanonicalPath() + File.separator + "spark";
|
||||
}
|
||||
}
|
||||
else if (Spark.isMac()) {
|
||||
command = "open -a Spark";
|
||||
|
||||
@ -1944,7 +1944,9 @@ public class StringUtils {
|
||||
* @author wolf.posdorfer
|
||||
*/
|
||||
public static String modifyWildcards(String resource) {
|
||||
|
||||
if(resource==null)
|
||||
return "";
|
||||
|
||||
resource = resource.replace("%random%",
|
||||
"" + Math.round((Math.random() * 1000)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user