ftp.server: Don't fetch to the same directory we serve from or else it will overwrite the file. Race condition, only shows up on Windows for some reason.

locals-and-roots
Doug Coleman 2016-04-15 15:52:06 -07:00
parent 97e87f4a05
commit 099e142200
1 changed files with 11 additions and 5 deletions

View File

@ -19,17 +19,23 @@ CONSTANT: test-file-contents "Files are so boring anymore."
] with-test-directory ; inline ] with-test-directory ; inline
{ t } [ { t } [
[
! give client its own directory so we don't overwrite the ftp server's file
[ [
[ ftp-get ] [ ftp-get ]
[ path>> file-name ascii file-contents ] bi [ path>> file-name ascii file-contents ] bi
] with-test-directory
] test-ftp-server test-file-contents = ] test-ftp-server test-file-contents =
] unit-test ] unit-test
[ [
[
! give client its own directory so we don't overwrite the ftp server's file
[ [
"/" >>path "/" >>path
[ ftp-get ] [ ftp-get ]
[ path>> file-name ascii file-contents ] bi [ path>> file-name ascii file-contents ] bi
] with-test-directory
] test-ftp-server test-file-contents = ] test-ftp-server test-file-contents =
] must-fail ] must-fail