Update file type on save only if path changes
Differential Revision: https://phabricator.kde.org/D4190
Contributed by Mikko Perttunen