diff --git a/vfs/ChangeLog b/vfs/ChangeLog index d84424b32..e7d54f728 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2000-02-21 Pavel Machek + + * extfs/uzip.in (nam): y2k fixes (workarounds) by + christian.gennerat@vz.cit.alcatel.fr + 2000-02-04 Pavel Machek * ftpfs.c (ftpfs_unlink, *): prepend / so that it actually works diff --git a/vfs/extfs/uzip.in b/vfs/extfs/uzip.in index f54484b93..4108643d4 100644 --- a/vfs/extfs/uzip.in +++ b/vfs/extfs/uzip.in @@ -64,10 +64,14 @@ BEGIN { hyphens=0 } if (hyphens < 1) next; if ($8 ~ /^\^/) $8=substr($8, 2) +## Y2K patch. if Year>=2000, unzip returns Year>=100 +split($5, a, "-") +if (a[3] > 99) + a[3] = substr(a[3],2) if ($8 ~ /\/$/) - printf "drwxr-xr-x 1 %-8d %-8d %8d %s %s %s\n", uid, 0, $1, $5, $6, $8 + printf "drwxr-xr-x 1 %-8d %-8d %8d %s-%s-%s %s %s\n", uid, 0, $1, a[1],a[2],a[3], $6, $8 else - printf "-rw-r--r-- 1 %-8d %-8d %8d %s %s %s\n", uid, 0, $1, $5, $6, substr($0, index($0, $7) + length($7 " ") -1 ) + printf "-rw-r--r-- 1 %-8d %-8d %8d %s-%s-%s %s %s\n", uid, 0, $1, a[1],a[2],a[3], $6, $8 }' 2>/dev/null fi } @@ -122,7 +126,7 @@ mczipfs_rmdir () umask 077 -#echo "`date +%T` ${0##*/} $1 $2 to=$3 tmp=$4" >>/tmp/${0##*/}.log +#echo "`date +%T` ${0##*/} $1 $2 to=$3 tmp=$4" >>~/tmp/${0##*/}.log case "$1" in list) mczipfs_list "$2"; exit 0;; rm) mczipfs_rm "$2" "$3" ; exit 0;;