hello,
a so weird error i do not expect answers but who knows....
when copying a file with copy-file or upi/cp:
https://docs.racket-lang.org/upi/upi-cp.html
it is truncated near the end (496kb file):
<TR>
<TD>
2021-01-01T23:53:00.000
</TD>
<TD>
-0.479085
so i get error in browser :
Erreur d’analyse XML : aucun élément trouvé
Emplacement : http://localhost/Vl5OLGf.xml
Numéro de ligne 32998, Colonne 18 :
-0.479085
-----------------^
just wanted to avoid a few lines of code by using copy-file to avoid launching an unix subprocess with cp, so i code it this way:
;; copy file to make it public to the remote web browser
{basename-trajectory-xml <- (basename trajectory-xml)}
;;(copy-file trajectory-xml (string-append "../" basename-trajectory-xml))
(cp trajectory-xml (string-append "../" basename-trajectory-xml))
if i look to the source file on disk the end of file is correct:
<TD>
-0.479085
</TD>
<TD>
0.023290
</TD>
<TD>
-2.295427
</TD>
<TD>
13.800711743772244
</TD>
<TD>
-0.9750889679715302
</TD>
<TD>
13.615658362989326
</TD>
</TR>
<TR>
<TD>
2021-01-01T23:54:00.000
</TD>
<TD>
-0.428158
</TD>
<TD>
0.021976
</TD>
<TD>
-2.272187
</TD>
<TD>
14.133451957295375
</TD>
<TD>
-0.896797153024911
</TD>
<TD>
14.160142348754448
</TD>
</TR>
<TR>
<TD>
2021-01-01T23:55:00.000
</TD>
<TD>
-0.377049
</TD>
<TD>
0.020649
</TD>
<TD>
-2.247945
</TD>
<TD>
14.281138790035588
</TD>
<TD>
-1.1245551601423487
</TD>
<TD>
14.524911032028472
</TD>
</TR>
<TR>
<TD>
2021-01-01T23:56:00.000
</TD>
<TD>
-0.325759
</TD>
<TD>
0.019309
</TD>
<TD>
-2.222663
</TD>
<TD>
14.583629893238435
</TD>
<TD>
-1.208185053380783
</TD>
<TD>
14.87544483985765
</TD>
</TR>
<TR>
<TD>
2021-01-01T23:57:00.000
</TD>
<TD>
-0.274306
</TD>
<TD>
0.017956
</TD>
<TD>
-2.196307
</TD>
<TD>
14.818505338078293
</TD>
<TD>
-1.1672597864768683
</TD>
<TD>
15.21708185053381
</TD>
</TR>
<TR>
<TD>
2021-01-01T23:58:00.000
</TD>
<TD>
-0.222710
</TD>
<TD>
0.016590
</TD>
<TD>
-2.168841
</TD>
<TD>
15.09608540925267
</TD>
<TD>
-1.2188612099644127
</TD>
<TD>
15.701067615658364
</TD>
</TR>
<TR>
<TD>
2021-01-01T23:59:00.000
</TD>
<TD>
-0.170992
</TD>
<TD>
0.015211
</TD>
<TD>
-2.140229
</TD>
<TD>
15.45373665480427
</TD>
<TD>
-1.3558718861209964
</TD>
<TD>
16.144128113879002
</TD>
</TR>
</TABLEDATA>
</DATA>
</TABLE>
</RESOURCE>
</VOTABLE>
when i look to the end of destination file on disk:
<TD>
2021-01-01T23:53:00.000
</TD>
<TD>
-0.479085
it is truncated. So the copied file is really truncated this is not an effect of network web application or browser.
the source file size is :
499771 bytes, so i do not think it is big or slow to copy it....
i tested with copy-file, upi/cp many times , it does not works...
any idea about what cause that?
update:
here is the file info on disk:
ls -la Vh5RkaG.xml /opt/homebrew/var/www/Vh5RkaG.xml
-rwxrw-rw- 1 _www admin 497382 9 déc 15:27 /opt/homebrew/var/www/Vh5RkaG.xml
-rwxrw-rw- 1 _www wheel 499771 9 déc 15:27 Vh5RkaG.xml
clearly it is truncated.
update 2:
but i can copy it manually in command line, just to test if there was some quota
or something else activate n the filesystem:
_www@mbp-touch-bar-1 tmp % cp Vh5RkaG.xml /opt/homebrew/var/www/test.xml
_www@mbp-touch-bar-1 tmp % ls -la Vh5RkaG.xml /opt/homebrew/var/www/test.xml
-rwxr--r-- 1 _www admin 499771 9 déc 15:47 /opt/homebrew/var/www/test.xml
-rwxrw-rw- 1 _www wheel 499771 9 déc 15:27 Vh5RkaG.xml