could it perhaps be a kind of trench art ?
a hidden sword in a walking cane is also often seen in Europe and the UK in the 19th century....
and hence could it be either be made by a solder or POW ( in Africa?)....?
just a wild guess, but maybe some forum member with more knowledge on trench art would be able to comment....
as intriging the origin of this set of two are indeed !