- if ((cp = r1bindex(file, '/')) == file)
- snprintf(buffer, sizeof(buffer), "%s%s",
- BACKUP_PREFIX, cp);
- else
- snprintf(buffer, sizeof(buffer), "%.*s%s%s", (int)(cp - file), file,
- BACKUP_PREFIX, cp);
+ if ((cp = mhbasename(file)) == file)
+ snprintf(buffer, sizeof(buffer), "%s%s", backup_prefix, cp);
+ else
+ snprintf(buffer, sizeof(buffer), "%.*s%s%s", (int)(cp - file),
+ file, backup_prefix, cp);