Rebased from https://github.com/balderdashy/sails/pull/1012 as hotfix for windows view issue.