Fix DIZ extraction/use for FTP uploads
1. Was not setting f->dir to the correct directory number, so only ftp-uploads to the *first* directory (dirnum = 0) would extract DIZ files of uploaded files. Removing the 'dirnum' parameter to addfile() since that implied that you did not have to initialize the 'dir' element of the passed file_t, but you do: to get the correct file path for file size/date detection and the DIZ extraction. 2. Was getting heap-corruption when freeing the imported/formatted DIZ text on Windows once the above problem was fixed: can't free() in one DLL memory that was allocated in another DLL. Created and now using free_diz() to free the memory allocated in read_diz(). format_diz() handles a NULL 'lines' argument correctly/gracefully, so no need for the NULL lines check in sbbs_t::uploadfile(). Added FTP server log messages for successful file upload or update by user.
parent
bf1cae28
No related branches found
No related tags found
Showing
- src/sbbs3/addfiles.c 1 addition, 1 deletionsrc/sbbs3/addfiles.c
- src/sbbs3/file.cpp 2 additions, 1 deletionsrc/sbbs3/file.cpp
- src/sbbs3/filedat.c 7 additions, 2 deletionssrc/sbbs3/filedat.c
- src/sbbs3/filedat.h 2 additions, 1 deletionsrc/sbbs3/filedat.h
- src/sbbs3/ftpsrvr.c 10 additions, 3 deletionssrc/sbbs3/ftpsrvr.c
- src/sbbs3/js_filebase.c 1 addition, 1 deletionsrc/sbbs3/js_filebase.c
- src/sbbs3/listfile.cpp 2 additions, 1 deletionsrc/sbbs3/listfile.cpp
- src/sbbs3/upload.cpp 3 additions, 4 deletionssrc/sbbs3/upload.cpp
Loading