[3.8] fix #1496

todo : test windows