--- parser3/src/classes/file.C 2001/08/23 12:10:30 1.49 +++ parser3/src/classes/file.C 2001/09/13 14:10:54 1.52 @@ -5,9 +5,9 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: file.C,v 1.49 2001/08/23 12:10:30 parser Exp $ + $Id: file.C,v 1.52 2001/09/13 14:10:54 parser Exp $ */ -static const char *RCSId="$Id: file.C,v 1.49 2001/08/23 12:10:30 parser Exp $"; +static const char *RCSId="$Id: file.C,v 1.52 2001/09/13 14:10:54 parser Exp $"; #include "pa_config_includes.h" @@ -74,7 +74,7 @@ static void _move(Request& r, const Stri Value& vfrom_file_name=params->as_no_junction(0, "from file name must not be code"); Value& vto_file_name=params->as_no_junction(1, "to file name must not be code"); - // unlink + // move file_move(pool, r.absolute(vfrom_file_name.as_string()), r.absolute(vto_file_name.as_string())); @@ -126,7 +126,7 @@ static void _load(Request& r, const Stri :lfile_name.cstr(String::UL_FILE_NAME); static_cast(r.self)->set(true/*tainted*/, data, size, - user_file_name, &r.mime_type_of(user_file_name)); + user_file_name, new(pool) VString(r.mime_type_of(user_file_name))); } static void _stat(Request& r, const String& method_name, MethodParams *params) { @@ -315,7 +315,7 @@ static void _list(Request& r, const Stri ®exp->mid(erroffset, regexp->size()), "regular expression syntax error - %s", errptr); - ovector=(int *)malloc(sizeof(int)*(ovecsize=(1/*match*/)*3)); + ovector=(int *)pool.malloc(sizeof(int)*(ovecsize=(1/*match*/)*3)); } else regexp_code=0; @@ -347,7 +347,7 @@ static void _list(Request& r, const Stri } if(suits) { - char *file_name_cstr=(char *)r.malloc(file_name_size); + char *file_name_cstr=(char *)pool.malloc(file_name_size); memcpy(file_name_cstr, ffblk.ff_name, file_name_size); String &file_name=*new(pool) String(pool); file_name.APPEND(file_name_cstr, file_name_size, String::UL_FILE_NAME,