diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-11-06 14:35:33 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-11-06 14:35:33 +0000 |
commit | d6c4e4c6922ecf2dd57b66729c7cbf593d0db6bd (patch) | |
tree | f82b4e26798135210093ae522efce08596827bec /Functions | |
parent | 39e4cfd4db1615f50cff0d5dfd7921a72ee8d125 (diff) | |
download | zsh-d6c4e4c6922ecf2dd57b66729c7cbf593d0db6bd.tar.gz zsh-d6c4e4c6922ecf2dd57b66729c7cbf593d0db6bd.tar.xz zsh-d6c4e4c6922ecf2dd57b66729c7cbf593d0db6bd.zip |
Frank Terbeck: 27353: more VCS_Info sanity checks
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/VCS_Info/VCS_INFO_bydir_detect | 1 | ||||
-rw-r--r-- | Functions/VCS_Info/vcs_info | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_bydir_detect b/Functions/VCS_Info/VCS_INFO_bydir_detect index 7985b6994..0b5996fd8 100644 --- a/Functions/VCS_Info/VCS_INFO_bydir_detect +++ b/Functions/VCS_Info/VCS_INFO_bydir_detect @@ -8,6 +8,7 @@ local basedir="." realbasedir realbasedir="$(VCS_INFO_realpath ${basedir})" while [[ ${realbasedir} != '/' ]]; do + [[ -r ${realbasedir} ]] || return 1 if [[ -n ${vcs_comm[detect_need_file]} ]] ; then [[ -d ${basedir}/${dirname} ]] && \ [[ -e ${basedir}/${dirname}/${vcs_comm[detect_need_file]} ]] && \ diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info index a821e4d03..4344d0b6e 100644 --- a/Functions/VCS_Info/vcs_info +++ b/Functions/VCS_Info/vcs_info @@ -41,6 +41,8 @@ vcs_info () { emulate -L zsh setopt extendedglob + [[ -r . ]] || return 0 + local pat local -i found local -a enabled disabled dps |