* Matthew Toseland <toad at amphibian.dyndns.org> [2008-03-06 23:02:33]:
> On Thursday 06 March 2008 16:19, nextgens at freenetproject.org wrote:
> > Author: nextgens
> > Date: 2008-03-06 16:19:22 +0000 (Thu, 06 Mar 2008)
> > New Revision: 18398
> >
> > Modified:
> > trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
> > trunk/freenet/src/freenet/support/LibraryLoader.java
> > trunk/freenet/src/freenet/support/io/NativeThread.java
> > Log:
> > DOH!
> >
> > Modified: trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
> > 2008-03-06
> 16:05:56 UTC (rev 18397)
> > +++ trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
> > 2008-03-06
> 16:19:22 UTC (rev 18398)
> > @@ -464,7 +464,7 @@
> > boolean writtenNewJar = false;
> > boolean writtenNewExt = false;
> >
> > - boolean tryEasyWay = File.pathSeparatorChar == '/' &&
> > !hasNewExtJar;
> > + boolean tryEasyWay = File.pathSeparatorChar == ':' &&
> > !hasNewExtJar;
>
> Wrong, the easy way only works on *nix.
Yeah, that's what I did here... The previous test was broken!
File.pathSeparatorChar is ":" on *nix and ";" on windows.
> >
> > File mainJar = ctx.getMainJar();
> > File newMainJar = ctx.getNewMainJar();
> >
> > Modified: trunk/freenet/src/freenet/support/LibraryLoader.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/support/LibraryLoader.java 2008-03-06
> > 16:05:56
> UTC (rev 18397)
> > +++ trunk/freenet/src/freenet/support/LibraryLoader.java 2008-03-06
> > 16:19:22
> UTC (rev 18398)
> > @@ -32,7 +32,7 @@
> > }
> >
> > public static void loadNative(String path, String libraryName) {
> > - final boolean isWindows = File.pathSeparatorChar == '\\';
> > + final boolean isWindows = File.pathSeparatorChar == ';';
>
> That looks a lot like a semicolon to me.
It is.
>
> > final String prefix = (isWindows ? ".dll" :
> ((System.getProperty("os.name")).toLowerCase().startsWith("mac") ? ".jnilib"
> : ".so"));
> > final String libraryNameWithPrefix = (isWindows ? "" : "lib") +
> libraryName;
> > final String libraryNameWithPrefixAndArch =
> > libraryNameWithPrefix + '-' +
> getSimplifiedArchitecture();
> >
> > Modified: trunk/freenet/src/freenet/support/io/NativeThread.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/support/io/NativeThread.java 2008-03-06
> 16:05:56 UTC (rev 18397)
> > +++ trunk/freenet/src/freenet/support/io/NativeThread.java 2008-03-06
> 16:19:22 UTC (rev 18398)
> > @@ -38,7 +38,7 @@
> >
> > static {
> > Logger.minor(NativeThread.class, "Running init()");
> > - _loadNative = (!(File.pathSeparatorChar == '\\')) ||
> (NodeStarter.extBuildNumber < 18);
> > + _loadNative = (File.pathSeparatorChar == ':') &&
> (NodeStarter.extBuildNumber < 18);
>
> That finally makes sense. :)
Still, I'll reinstate the old test as loading the libraries for macos is
useless.
NextGen$
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080307/a245a430/attachment.pgp>