Avoid calling ecl_char() in mkdir

This commit is contained in:
Juan Jose Garcia Ripoll 2012-04-13 01:02:38 +02:00
parent 6355c80700
commit 441b57d3f5

View file

@ -1027,8 +1027,11 @@ si_mkdir(cl_object directory, cl_object mode)
/* Ensure a clean string, without trailing slashes,
* and null terminated. */
cl_index last = filename->base_string.fillp;
while (last > 1 && IS_DIR_SEPARATOR(ecl_char(filename, --last)))
{}
if (last > 1) {
ecl_character c = filename->base_string.self[last-1];
if (IS_DIR_SEPARATOR(c))
last--;
}
filename = ecl_subseq(filename, 0, last);
}
ecl_disable_interrupts();