On Friday 07 March 2008 02:37, Florent Daignière wrote: > * Matthew Toseland <[EMAIL PROTECTED]> [2008-03-06 23:02:33]: > > > On Thursday 06 March 2008 16:19, [EMAIL PROTECTED] 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.
Ahhh, confusion with separatorChar.
>
> > >
> > > 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.
Can't you check for linux explicitly?
>
> NextGen$
pgphYJB2WaV4k.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
