diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java index 3a92ce31f8..3b1a5d7ad8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java @@ -122,25 +122,26 @@ static void loadAdditionalLibraries (String mozillaPath) { String libName = "libswt-xulrunner-fix.so"; //$NON-NLS-1$ File libsDir = new File (getProfilePath () + "/libs/" + Mozilla.OS() + '/' + Mozilla.Arch ()); //$NON-NLS-1$ File file = new File (libsDir, libName); - java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName); - if (is != null) { - if (!libsDir.exists ()) { - libsDir.mkdirs (); - } - int read; - byte [] buffer = new byte [4096]; - try { - FileOutputStream os = new FileOutputStream (file); - while ((read = is.read (buffer)) != -1) { - os.write(buffer, 0, read); + if (!file.exists()) { + java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName); + if (is != null) { + if (!libsDir.exists ()) { + libsDir.mkdirs (); + } + int read; + byte [] buffer = new byte [4096]; + try { + FileOutputStream os = new FileOutputStream (file); + while ((read = is.read (buffer)) != -1) { + os.write(buffer, 0, read); + } + os.close (); + is.close (); + } catch (FileNotFoundException e) { + } catch (IOException e) { } - os.close (); - is.close (); - } catch (FileNotFoundException e) { - } catch (IOException e) { } } - if (file.exists ()) { byte[] bytes = Converter.wcsToMbcs (null, file.getAbsolutePath (), true); OS.dlopen (bytes, OS.RTLD_NOW | OS.RTLD_GLOBAL); |