- //Log("&ret[read] = '%s'", &ret[read]);
- // Current Dir "."
- if(strncmp(&ret[read], ".", pos-read) == 0) continue;
- // Parent ".."
- if(strncmp(&ret[read], "..", pos-read) == 0)
- {
- // If there is no higher, silently ignore
- if(slashNum < 1) {
- write = 1;
- continue;
- }
- // Reverse write pointer
- write = slashOffsets[ --slashNum ];
- continue;
+ pathComps[iPos++] = tmpStr;
+ if(iPos == MAX_PATH_SLASHES) {
+ LOG("Path '%s' has too many elements", Path);
+ free(ret);
+ LEAVE('n');
+ return NULL;