It only does the right thing on unix, and the implementation isn't great either. This reverts commit bb1c0398.