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] == '.') { |