remove duplicated code
remove unused method tail()
Merge pull request #6469 from owncloud/enc_cleanup

remove duplicated code