Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
deebadef3a | ||
|
|
ce24ae4fae |
No files matched your search
+2
-1
@@ -19,6 +19,7 @@ package org.jackhuang.hellominecraft.launcher.core.version;
|
||||
|
||||
import org.jackhuang.hellominecraft.launcher.core.download.DownloadType;
|
||||
import org.jackhuang.hellominecraft.util.StrUtils;
|
||||
import org.jackhuang.hellominecraft.util.system.IOUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -38,7 +39,7 @@ public class LibraryDownloadInfo extends GameDownloadInfo {
|
||||
if (path == null)
|
||||
return null;
|
||||
else
|
||||
myURL += path.replace('\\', '/');
|
||||
myURL = IOUtils.addURLSeparator(myURL) + path.replace('\\', '/');
|
||||
return myURL;
|
||||
}
|
||||
}
|
||||
@@ -354,7 +354,7 @@ public class MainPagePanel extends AnimatedPanel {
|
||||
if (l.isLoggedIn())
|
||||
l.logOut();
|
||||
cl.first(pnlPassword);
|
||||
pnlPassword.repaint();
|
||||
SwingUtilities.invokeLater(this::repaint);
|
||||
}//GEN-LAST:event_btnLogoutActionPerformed
|
||||
|
||||
private void txtPlayerNameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPlayerNameKeyPressed
|
||||
|
||||
@@ -54,6 +54,15 @@ public class IOUtils {
|
||||
return path + File.separatorChar;
|
||||
}
|
||||
|
||||
public static String addURLSeparator(String path) {
|
||||
if (path == null || path.trim().length() == 0)
|
||||
return "";
|
||||
if (path.charAt(path.length() - 1) == '/')
|
||||
return path;
|
||||
else
|
||||
return path + '/';
|
||||
}
|
||||
|
||||
public static boolean isSeparator(char ch) {
|
||||
return ch == File.separatorChar || ch == '/' || ch == '\\';
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.util.ui;
|
||||
|
||||
import java.awt.Frame;
|
||||
import javax.swing.text.BadLocationException;
|
||||
import javax.swing.text.Document;
|
||||
import javax.swing.text.SimpleAttributeSet;
|
||||
import javax.swing.text.StyleConstants;
|
||||
@@ -28,7 +26,6 @@ import org.jackhuang.hellominecraft.util.logging.Level;
|
||||
import org.jackhuang.hellominecraft.util.func.NonFunction;
|
||||
import org.jackhuang.hellominecraft.util.DoubleOutputStream;
|
||||
import org.jackhuang.hellominecraft.util.LauncherPrintStream;
|
||||
import org.jackhuang.hellominecraft.util.MessageBox;
|
||||
import org.jackhuang.hellominecraft.util.Utils;
|
||||
|
||||
/**
|
||||
@@ -254,7 +251,7 @@ public class LogWindow extends javax.swing.JFrame {
|
||||
StyleConstants.setForeground(sas, c.COLOR);
|
||||
try {
|
||||
d.insertString(d.getLength(), status, sas);
|
||||
} catch (BadLocationException ex) {
|
||||
} catch (Exception ex) {
|
||||
HMCLog.err("Failed to insert \"" + status + "\" to " + d.getLength(), ex);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user