On Fri, 01 Nov 2002, wts42 at hushmail.com wrote:
>
> The -R option for the windows version of fcpputsute does not quite work.
>
> If I use upload five files (file1, file2, file3, file4, file5) with
> fcpputsite -R FILE, I'll end up with two new files:
> FILE.new will have the CHK's for file4 and file5
> FILE will have the CHK for file 5
>
> It looks like FILE.new is a temp file that is supposed to get renamed to FILE
> during each cycle, but a step is getting lost somewhere.
Yup. Which means that rename() dosn't work the same way on windows as
it does in unix. Feep. :P
See if the following patch helps? (whitespace eaten by cut-n-paste)
RCS file: /cvsroot/freenet/Contrib/fcptools/fcpputsite/insertFreesite.c,v
retrieving revision 1.23
diff -u -r1.23 insertFreesite.c
--- insertFreesite.c 1 Aug 2002 15:45:08 -0000 1.23
+++ insertFreesite.c 6 Nov 2002 11:07:32 -0000
@@ -107,6 +107,7 @@
fprintf(nfp, "%s:%08x:%08x:%08x:%s\n",
file->chk, time(NULL), file->ctime, file->size, file->filename);
fclose(nfp);
+ unlink(opts->recordFile);
rename(nfp_n, opts->recordFile);
return(0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20021106/3eca9492/attachment.pgp>