> > What you wrote doesn't work for dir="C:" and file=""... > > InvalidArc is raised. > > Not when I run it. I get "C:/". Not the brightest thing I've ever said :-(. How about the following? fun joinDirFile {dir, file} = let val {arcs, isAbs, vol} = fromString dir val arcs = case (arcs, file) of ([], "") => [] | _ => concatArcs (arcs, [file]) in toString {arcs = arcs, isAbs = isAbs, vol = vol} end