--- parser3/src/classes/file.C 2002/11/25 14:57:32 1.105 +++ parser3/src/classes/file.C 2003/04/15 06:44:33 1.106.2.1 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_FILE_C="$Date: 2002/11/25 14:57:32 $"; +static const char* IDENT_FILE_C="$Date: 2003/04/15 06:44:33 $"; #include "pa_config_includes.h" @@ -134,7 +134,7 @@ static void _load(Request& r, const Stri Hash *fields=0; file_read(pool, lfile_name, data, size, vmode_name.as_string()==TEXT_MODE_NAME, - third_param_hash, + third_param_hash, &r, &fields ); @@ -578,8 +578,12 @@ static void _fullpath(Request& r, const // /some/page.html: ^file:fullpath[a.gif] => /some/a.gif const String& full_disk_path=r.absolute(file_spec); size_t document_root_length=strlen(r.info.document_root); - if(document_root_length>0) - --document_root_length; + + if(document_root_length>0) { + char last_char=r.info.document_root[document_root_length-1]; + if(last_char == '/' || last_char == '\\') + --document_root_length; + } result=&full_disk_path.mid(document_root_length, full_disk_path.size()); } r.write_assign_lang(*result);