Further improve accuracy of cd builtins error messages. Now correctly reports rotten symlinks.

darcs-hash:20070920175243-75c98-e210034c7bfc8308be9e03017a5a0d8ef7648b9c.gz
This commit is contained in:
liljencrantz
2007-09-21 03:52:43 +10:00
parent 3b39b1fa03
commit 607e970659
3 changed files with 32 additions and 8 deletions

8
path.c
View File

@@ -217,6 +217,14 @@ wchar_t *path_get_cdpath( void *context, wchar_t *dir )
err = ENOTDIR;
}
}
else
{
if( lwstat( whole_path, &buf ) == 0 )
{
err = EROTTEN;
}
}
free( whole_path );
}
free( path_cpy );