mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 22:01:36 -08:00
unixfsys.d: enter-directory: Coerce if directory is extended string.
If directory is of type (simple-array character(*)), then coerce it to (simple-array base-char (*)) instead of throwing an error. Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
This commit is contained in:
parent
746f3edbfe
commit
8977a7cc85
1 changed files with 5 additions and 3 deletions
|
|
@ -268,9 +268,11 @@ enter_directory(cl_object base_dir, cl_object subdir, bool ignore_if_failure)
|
|||
} else if (subdir == @':up') {
|
||||
aux = make_constant_base_string("..");
|
||||
} else if (!ECL_BASE_STRING_P(subdir)) {
|
||||
FEerror("Directory component ~S found in pathname~& ~S"
|
||||
"~&is not allowed in TRUENAME or DIRECTORY",
|
||||
1, subdir);
|
||||
unlikely_if (!ecl_fits_in_base_string(subdir))
|
||||
FEerror("Directory component ~S found in pathname~& ~S"
|
||||
"~&is not allowed in TRUENAME or DIRECTORY",
|
||||
1, subdir);
|
||||
aux = si_coerce_to_base_string(subdir);
|
||||
} else {
|
||||
aux = subdir;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue