Ticket #2886: cd-not-a-dir.patch
File cd-not-a-dir.patch, 705 bytes (added by , 15 years ago) |
---|
-
src/bin/bash/builtins/cd.def
398 398 resolved path doesn't exist), fail immediately. */ 399 399 if (posixly_correct && nolinks == 0 && canon_failed) 400 400 { 401 errno = ENOENT; 401 // if sh_physpath or sh_canonpath failed, it can mean either ENOENT or 402 // ENOTDIR. errno is already set to ENOENT when path was stat()'ed in 403 // sh_physpath or sh_canonpath, so if the errno is not ENOENT then errno 404 // is ENOTDIR. 405 if (errno != ENOENT) 406 errno = ENOTDIR; 402 407 return (0); 403 408 } 404 409