Commit 63801da8 authored by Johannes Schindelin's avatar Johannes Schindelin Committed by Junio C Hamano

import-zips: fix thinko

Embarrassingly, the common prefix calculation did not work properly, due
to a mistake in the assignment: instead of assigning the dirname of the
current file name, the dirname of the current common prefix needs to
be assigned to common prefix, when the current prefix does not match the
current file name.
Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent e8bd78c3
......@@ -44,7 +44,8 @@ def printlines(list):
common_prefix = name[:name.rfind('/') + 1]
while not name.startswith(common_prefix):
common_prefix = name[:name.rfind('/') + 1]
last_slash = common_prefix[:-1].rfind('/') + 1
common_prefix = common_prefix[:last_slash]
mark[name] = ':' + str(next_mark)
next_mark += 1
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment