Process for treating a textile material