]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement the rename query, for when a file with the same name as the one
authorgavin <gavin@FreeBSD.org>
Tue, 16 Feb 2010 22:53:18 +0000 (22:53 +0000)
committergavin <gavin@FreeBSD.org>
Tue, 16 Feb 2010 22:53:18 +0000 (22:53 +0000)
commit3191fb252eac098795bf2f1dd180c8a333a67699
treeb359ad46ebd56eb6ad1d58427695192c6bfbd306
parentb9e425b3c99ae4831af7b412e871f414875601be
Implement the rename query, for when a file with the same name as the one
about to be extracted already exists.  The question, and interpretation
of the response is deliberately compatible with Info-Zip.

This change was originally obtained from NetBSD, but has three changes:
 - better compatibility with Info-Zip in the handling of ^D
 - Use getdelim() rather than getline()
 - bug fix: != changed to == in the "file rename" code

I suspect the latter is also a bug in NetBSD, but I can't easily confirm
this.

PR: bin/143307
Reviewed by: rdivacky (change to unzip.c only)
Obtained from: NetBSD src/usr.bin/unzip/unzip.c 1.8
MFC after: 1 month
usr.bin/unzip/unzip.1
usr.bin/unzip/unzip.c