From 6dbf2f2f4a97e2831094a73c662484ce990e7e41 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sun, 2 Nov 2008 14:12:29 +0000 Subject: 25988: declare temporary cache array as local, thanks to problem noticed by Kazuhiro NISHIYAMA. --- Completion/Darwin/Command/_fink | 1 + Completion/Darwin/Type/_retrieve_mac_apps | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'Completion/Darwin') diff --git a/Completion/Darwin/Command/_fink b/Completion/Darwin/Command/_fink index f0ff6834e..27ca3740c 100644 --- a/Completion/Darwin/Command/_fink +++ b/Completion/Darwin/Command/_fink @@ -55,6 +55,7 @@ _fink_get_packages(){ } _finkpkgs_caching_policy(){ + local -a oldp oldp=( "$1"(Nmw+1) ) (( $#oldp )) || [[ /sw/var/cache/apt/pkgcache.bin -nt "$1" ]] || diff --git a/Completion/Darwin/Type/_retrieve_mac_apps b/Completion/Darwin/Type/_retrieve_mac_apps index f435fde26..e9a30e006 100644 --- a/Completion/Darwin/Type/_retrieve_mac_apps +++ b/Completion/Darwin/Type/_retrieve_mac_apps @@ -4,9 +4,10 @@ # Used by _mac_applications and _mac_files_for_application. _mac_apps_caching_policy () { - # Rebuild if cache is more than a day old - oldp=( "$1"(Nmw+1) ) - (( $#oldp )) + # Rebuild if cache is more than a day old + local -a oldp + oldp=( "$1"(Nmw+1) ) + (( $#oldp )) } -- cgit v1.2.3-70-g09d2