return code;
}
- lastComponent = cm_ClientStrRChr(p, '\\');
- if (lastComponent && (lastComponent - p) > 1 &&
- cm_ClientStrLen(lastComponent) > 1) {
- *lastComponent = '\0';
- lastComponent++;
+ lastComponent = cm_ClientStrRChr(p, L'\\');
+ if (lastComponent && (lastComponent - p) > 1) {
+
+ if (cm_ClientStrLen(lastComponent) == 1) {
+ *lastComponent = '\0';
+ lastComponent = L".";
+ } else {
+ *lastComponent = L'\0';
+ lastComponent++;
+ }
code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
userp, NULL, reqp, &iscp);
return code;
}
- lastComponent = cm_ClientStrRChr(relativePath, '\\');
- if (lastComponent && (lastComponent - relativePath) > 1 && wcslen(lastComponent) > 1) {
- *lastComponent = '\0';
- lastComponent++;
+ lastComponent = cm_ClientStrRChr(relativePath, L'\\');
+ if (lastComponent && (lastComponent - relativePath) > 1) {
+ if (wcslen(lastComponent) == 1) {
+ *lastComponent = L'\0';
+ lastComponent = L".";
+ } else {
+ *lastComponent = L'\0';
+ lastComponent++;
+ }
code = cm_NameI(substRootp, relativePath, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
userp, NULL, reqp, &iscp);