Created
July 4, 2011 08:35
-
-
Save asv/1063073 to your computer and use it in GitHub Desktop.
Vuze open url bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Utils.java | |
=================================================================== | |
--- Utils.java (revision 26653) | |
+++ Utils.java (working copy) | |
@@ -22,6 +22,7 @@ | |
package org.gudy.azureus2.ui.swt; | |
import java.io.File; | |
+import java.io.IOException; | |
import java.util.*; | |
import java.util.List; | |
@@ -956,11 +957,14 @@ | |
if (!launched && Constants.isUnix) { | |
sFile = sFile.replaceAll( " ", "\\ " ); | |
- | |
- if (!Program.launch("xdg-open " + sFile)) { | |
- if ( !Program.launch("htmlview " + sFile)){ | |
- | |
- Debug.out( "Failed to launch '" + sFile + "'" ); | |
+ | |
+ try { | |
+ Runtime.getRuntime().exec(new String[] {"xdg-open", sFile}); | |
+ } catch (IOException exc) { | |
+ try { | |
+ Runtime.getRuntime().exec(new String[] {"htmlview", sFile}); | |
+ } catch (IOException exc2) { | |
+ Debug.out( "Failed to launch '" + sFile + "'"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment