The decidability of the dol prefix problem

A Language L is said to be prefix if and only if no word of L is a proper initial subword of another word of L. It is shown that there is an algorithm which given a DOL language decides whether or not it is prefix.