aboutsummaryrefslogtreecommitdiffhomepage
path: root/path.c
diff options
context:
space:
mode:
authorGravatar liljencrantz <liljencrantz@gmail.com>2007-09-21 03:52:43 +1000
committerGravatar liljencrantz <liljencrantz@gmail.com>2007-09-21 03:52:43 +1000
commit607e97065958640f09dbe5de103bae0fd7c350c5 (patch)
tree6ef09ac0199696b492f9af97089f883df43163b9 /path.c
parent3b39b1fa0302dcb0757b060a4255b84bee83d540 (diff)
Further improve accuracy of cd builtins error messages. Now correctly reports rotten symlinks.
darcs-hash:20070920175243-75c98-e210034c7bfc8308be9e03017a5a0d8ef7648b9c.gz
Diffstat (limited to 'path.c')
-rw-r--r--path.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/path.c b/path.c
index f30ceee7..51e675e0 100644
--- a/path.c
+++ b/path.c
@@ -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 );