Fix tarball generation bug noticed by Nicolas Benoit <nbenoit@tuxfamily.org>.

* viewcvs/lib/viewcvs.py
  (generate_tarball): rep_top is a list, so stop testing it against strings.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1013 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
cmpilato 2005-02-02 15:07:29 +00:00
parent e58df06c55
commit 4d1a7b09b3
1 changed files with 2 additions and 3 deletions

View File

@ -2698,11 +2698,10 @@ def generate_tarball_header(out, name, size=0, mode=None, mtime=0,
def generate_tarball(out, request, tar_top, rep_top,
reldir, options, stack=[]):
cvs = request.roottype == 'cvs'
if cvs and (rep_top == '' and 0 < len(reldir) and
if cvs and (0 == len(rep_top) and 0 < len(reldir) and
reldir[0] == 'CVSROOT' and cfg.options.hide_cvsroot):
return
if (rep_top == '' and cfg.is_forbidden(reldir[0])):
if 0 == len(rep_top) and 0 < len(reldir) and cfg.is_forbidden(reldir[0]):
return
rep_path = rep_top + reldir