diff options
author | Sky <git@bunnies.cc> | 2013-12-12 15:25:02 +0000 |
---|---|---|
committer | Sky <git@bunnies.cc> | 2013-12-12 15:25:02 +0000 |
commit | 808ca763632090abdab5a2451c95dbb0f4319126 (patch) | |
tree | 693978b949340006a2ca339fcc0a07fbab5576ae | |
parent | b963ff7416ef78308792b9693de0b47c0888054a (diff) | |
download | MultiMC-808ca763632090abdab5a2451c95dbb0f4319126.tar MultiMC-808ca763632090abdab5a2451c95dbb0f4319126.tar.gz MultiMC-808ca763632090abdab5a2451c95dbb0f4319126.tar.lz MultiMC-808ca763632090abdab5a2451c95dbb0f4319126.tar.xz MultiMC-808ca763632090abdab5a2451c95dbb0f4319126.zip |
Make sure adding forced candidates doesn't result in duplicates
-rw-r--r-- | logic/JavaUtils.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/logic/JavaUtils.cpp b/logic/JavaUtils.cpp index 278046e9..e1b3bc64 100644 --- a/logic/JavaUtils.cpp +++ b/logic/JavaUtils.cpp @@ -153,9 +153,14 @@ QList<QString> JavaUtils::FindJavaPaths() KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\Java Development Kit"); java_candidates.append(JRE64s); + java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre7/bin/java.exe")); + java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre6/bin/java.exe")); java_candidates.append(JDK64s); java_candidates.append(JRE32s); + java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre7/bin/java.exe")); + java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre6/bin/java.exe")); java_candidates.append(JDK32s); + java_candidates.append(MakeJavaPtr(this->GetDefaultJava()->path)); QList<QString> candidates; for(JavaVersionPtr java_candidate : java_candidates) @@ -166,13 +171,6 @@ QList<QString> JavaUtils::FindJavaPaths() } } - candidates.append("C:/Program Files/Java/jre7/bin/java.exe"); - candidates.append("C:/Program Files/Java/jre6/bin/java.exe"); - candidates.append("C:/Program Files (x86)/Java/jre7/bin/java.exe"); - candidates.append("C:/Program Files (x86)/Java/jre6/bin/java.exe"); - - candidates.append(this->GetDefaultJava()->path); - return candidates; } |