Only update metadata that has changed
Organize conditionals in a better order
Merge pull request #3532 from owncloud/scan-update

Only update metadata that has changed