This expression is a war fighting principle proposed by the ancient military thinker Sunzi in The Art of War. It means that a commander should have an accurate and full assessment of one's own and the enemy's deployment and not be distracted by temporary setbacks or difficulties. He should skillfully use unfavorable factors or situations to lull the enemy into a situation to his own advantage, and thus gain the upper hand. Such a military tactic is also used in social activities in which there is competition.
When two armies face each other, the biggest challenge is turning a twisting road into a straight one, or turning disadvantage into advantage. So a commander should lure and distract the enemy with tactics to his advantage, move after the enemy but take a shortcut route and reach the battleground first. This is how to turn a twisting road into a straight one. (The Art of War