- Fixed crash because of a memory overwrite

The static arrays in RsDiscSpace were to small for RS_PGP_DIRECTORY (0x0003)
  Added new constant RS_DIRECTORY_COUNT
- Added missing fclose to PGPHandler::encryptTextToFile
  Used ops_teardown_file_write instead of ops_writer_close and ops_create_info_delete
  Windows cannot move a file when it is still open

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6542 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-07-26 23:12:09 +00:00
parent b84930b157
commit e95725ea2c
4 changed files with 16 additions and 14 deletions

View file

@ -40,10 +40,10 @@
* #define DEBUG_RSDISCSPACE
*/
time_t RsDiscSpace::_last_check[3] = { 0,0,0 } ;
time_t RsDiscSpace::_last_check[RS_DIRECTORY_COUNT] = { 0,0,0,0 } ;
uint32_t RsDiscSpace::_size_limit_mb = 100 ;
uint32_t RsDiscSpace::_current_size[3] = { 10000,10000,10000 } ;
bool RsDiscSpace::_last_res[3] = { true,true,true };
uint32_t RsDiscSpace::_current_size[RS_DIRECTORY_COUNT] = { 10000,10000,10000,10000 } ;
bool RsDiscSpace::_last_res[RS_DIRECTORY_COUNT] = { true,true,true,true };
RsMutex RsDiscSpace::_mtx("RsDiscSpace") ;
std::string RsDiscSpace::_partials_path = "" ;
std::string RsDiscSpace::_download_path = "" ;