getcwd: fix too long pathnames bug

This commit is contained in:
Daniel Kochmański 2016-04-18 10:45:12 +02:00
parent 50566bc5e7
commit ac5f011f57
2 changed files with 5 additions and 2 deletions

View file

@ -37,9 +37,12 @@ section "Removed interfaces".
** Issues fixed
- MOP: fix problemes when redefining non-standard and anonymous classes
Bugs identified and fixed by Pascal Costanza.
- getcwd: fix issue with too long pathname
This fixes the regression, which crashed ECL at start when pathname
exceeded 128 characters limit.
* 16.1.2 changes since 16.0.0
** API changes

View file

@ -158,7 +158,7 @@ current_dir(void) {
output = ecl_alloc_adjustable_base_string(size);
ecl_disable_interrupts();
ok = getcwd((char*)output->base_string.self, size);
if (ok == NULL && errno != ENAMETOOLONG) {
if (ok == NULL && errno != ERANGE) {
perror("ext::getcwd error");
ecl_internal_error("Can't work without CWD");
}