Revert "Merge pull request #2560 from coolius/master"

This reverts commit 64a196f21d35b9f6e3857b2ff65e3d017c96c900, reversing
changes made to a24d4a9e3b23ec3c0fc4d21bb89cd44b1bc892eb.
Revert "Merge pull request #2596 from WoLpH/linked_file_delete"

This reverts commit a24d4a9e3b23ec3c0fc4d21bb89cd44b1bc892eb, reversing
changes made to b468048d95216474183daafaf46a4f2bd0d7ada7.