mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 05:43:19 -08:00
Avoid calling ecl_char() in mkdir
This commit is contained in:
parent
6355c80700
commit
441b57d3f5
1 changed files with 5 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue