CVS patchset: 2060
CVS date: 1998/04/02 17:48:34
dirName = alloca(maxLen + 1);
*lastDir = '\0';
+ /* cut off last filename */
for (i = 0; i < numFiles; i++) {
strcpy(buf, fileList[i]);
chptr = buf + strlen(buf) - 1;
return 1;
}
+ /* cut off last directory part, because it was not found. */
while (*chptr != '/') chptr--;
- *chptr-- = '\0';
+ *chptr-- = '\0';
+
+ if (chptr == dirName)
+ dirName[1] = '\0';
+ else
+ *chptr-- = '\0';
}
if (lastDev != sb.st_dev) {