protected function _checkDestination($path, $dest) { if (preg_match('|^' . preg_quote(rtrim($path, '/'), '|') . '/?$|', $dest)) { throw new Horde_Vfs_Exception('Cannot copy file(s) - source and destination are the same.'); } }