>> this code is untested, uncompiled and not verified - UAYOR!!
>
>PLEASE TEST IT.

i don't think this was a very productive reply from you, matthew, sorry

i have no cvs access and have to decompile the freenet class files. i
really tried hard to make the resulting .java files work, but after
nearly an hour of tweaking i had no success, so i provided some
untested and uncompiled code. maybe it's got a braino, but i don't know
the code as good as you, matthew

>The code works fine on unix and always has.

it does not work here and it doesn't work on 1/2 of the systems. so
what's your point about?

>If it needs
>the target file explicitly removing first, then it is yet another of the
>platform specificities that java is supposed to shield us from (ARE YOU
>LISTENING IAN?).

i'd think he's listening... want to hear some stories from C/C++ ?

>And it's deeply counterproductive; the
>write-to-another-file-and-then-rename-over-the-first one is a
>pseudo-transactional pattern that is WIDELY used on *nix to ensure that
>even if there is a crash there is probably a valid file on disk.

have a glimpse on the java api. the method File.renameTo() does not say
a word about "overwriting any file with the same filename". does your?

in fact, it's most sane to report an error if the filename we tried to
rename to already is occupied, rather than to overwirte it and return
an innocent "groovy" to the calling routine.

if you have the habit to overwrite/rename your files with 'mv'; are you
sure mv does not delete the destination filename prior renaming the
source file?

anyway, here's the point:

- it does not work on all platforms; all windoze nodes might be
unusable and harming freenet by flooding with ARKs and being difficult
to
connect
- there does exist a REALLY SIMPLE FIX (untested, uncompiled, you get
the idea)
- there's already a fscking patch available (to add: check and destroy
the node-temp file in the same manner, too)

thank you for your attention...... but perhaps you'll have a look at
this, okay? :) nevertheless it's a bug in fred which needs to be fixed
urgently...

_______________________________________________
devl mailing list
[EMAIL PROTECTED]
http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl

Reply via email to