src/server/safs/objecttype.c

changeset 428
ab58e46b50a5
parent 415
d938228c382e
child 466
019c22775f7c
equal deleted inserted replaced
427:a327cb6cc868 428:ab58e46b50a5
40 //printf("\nobject_type_by_extension: {%s}[%d]\n\n", path); 40 //printf("\nobject_type_by_extension: {%s}[%d]\n\n", path);
41 41
42 cxstring ct; 42 cxstring ct;
43 if(path.ptr[path.length - 1] == '/') { 43 if(path.ptr[path.length - 1] == '/') {
44 // directory 44 // directory
45 ct = (cxstring)CX_STR("internal/directory"); 45 ct = (cxstring)CX_STR(OBJTYPE_INTERNAL_DIRECTORY);
46 } else { 46 } else {
47 cxstring ext; 47 cxstring ext;
48 ext.length = 0; 48 ext.length = 0;
49 for(int i=path.length - 1;i>=0;i--) { 49 for(int i=path.length - 1;i>=0;i--) {
50 if(path.ptr[i] == '.') { 50 if(path.ptr[i] == '.') {

mercurial