y2k fixes for uzip
Этот коммит содержится в:
родитель
df4700188c
Коммит
63554e21ec
@ -1,3 +1,8 @@
|
|||||||
|
2000-02-21 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
|
||||||
|
|
||||||
|
* extfs/uzip.in (nam): y2k fixes (workarounds) by
|
||||||
|
christian.gennerat@vz.cit.alcatel.fr
|
||||||
|
|
||||||
2000-02-04 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
|
2000-02-04 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
|
||||||
|
|
||||||
* ftpfs.c (ftpfs_unlink, *): prepend / so that it actually works
|
* ftpfs.c (ftpfs_unlink, *): prepend / so that it actually works
|
||||||
|
@ -64,10 +64,14 @@ BEGIN { hyphens=0 }
|
|||||||
if (hyphens < 1) next;
|
if (hyphens < 1) next;
|
||||||
if ($8 ~ /^\^/)
|
if ($8 ~ /^\^/)
|
||||||
$8=substr($8, 2)
|
$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 ~ /\/$/)
|
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
|
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
|
}' 2>/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -122,7 +126,7 @@ mczipfs_rmdir ()
|
|||||||
|
|
||||||
umask 077
|
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
|
case "$1" in
|
||||||
list) mczipfs_list "$2"; exit 0;;
|
list) mczipfs_list "$2"; exit 0;;
|
||||||
rm) mczipfs_rm "$2" "$3" ; exit 0;;
|
rm) mczipfs_rm "$2" "$3" ; exit 0;;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user