Before returning the mangled name.bup for a chunked item, ensure that
the name really does refer to a dir in the git tree via asssert.
Signed-off-by: Holger Dell <github@holgerdell.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
disambiguate normal files from segmented ones.
"""
if stat.S_ISREG(mode) and not stat.S_ISREG(gitmode):
+ assert(stat.S_ISDIR(gitmode))
return name + '.bup'
elif name.endswith('.bup') or name[:-1].endswith('.bup'):
return name + '.bupl'