| 76 | } |
| 77 | |
| 78 | static bool cif_component(cif_context *c, const unsigned char *p, size_t n) { |
| 79 | if (!n || (n == 1 && p[0] == '.') || (n == 2 && p[0] == '.' && p[1] == '.')) { |
| 80 | return cif_fail(c, CBM_INVENTORY_INVALID); |
| 81 | } |
| 82 | #ifdef _WIN32 |
| 83 | if (!cif_poll(c)) { |
| 84 | return false; |
| 85 | } |
| 86 | if (cbm_path_windows_component(p, n) != CBM_PATH_SYNTAX_OK) { |
| 87 | return cif_fail(c, CBM_INVENTORY_UNSUPPORTED); |
| 88 | } |
| 89 | return cif_poll(c); |
| 90 | #else |
| 91 | return true; |
| 92 | #endif |
| 93 | } |
| 94 | |
| 95 | static bool cif_file_path(cif_context *c, cbm_inventory_path_t path, size_t root_length) { |
| 96 | if (path.length > CIF_PATH_MAX) { |
no test coverage detected