We use a similar item, a shower curtain rod, that is adjustable, with pads on each end, to keep our bedroom closet doors from sliding open while traveling. The slide mechanisms that fasten the doors at the bottom and the plastic cabinet latches for the middle of the doors are continually breaking, or the screws come loose.
Perhaps its a 'home made solution' for the same problem.