How can I override a module's file via hook_menu_alter()? I have the following code in my hook_menu_alter().

&lt;?php

function bonus_menu_alter(&amp;$items) {

  if (!empty($items['things'])){

    $items['things']['title'] = t("New title");
    $items['things']['callback'] = 'new_callback';
    $items['things']['file path'] = drupal_get_path("module", "bonus")."/includes/";
    $items['things']['file'] = 'bonus.pages.inc';

  }

}


The problem is that the file path of the new file is including the original modules path and spitting this out:

/var/www/staging/sites/all/modules/things/sites/all/modules/bonus/includes/bonus.pages.inc


The original implementation of the parent hook_menu():

/**
 * Implements hook_menu().
 */
function things_menu() {
  $items['things'] = array(
    'title' =&gt; 'Things title',
    'page callback' =&gt; 'things_callback',
    'access arguments' =&gt; array('access content'),
    'type' =&gt; MENU_CALLBACK,
    'file' =&gt; 'includes/things.pages.inc',
  );
  return $items;
}


What could I be doing wrong?
I think this happens because your alter hook does not update the value for $items['bonus']['module'], which was automatically set to 'things' when menu_router_build processed things_menu(). Try this:

$items['bonus']['module'] = 'bonus';
$items['bonus']['file path'] = '/includes/';
$items['bonus']['file'] = 'bonus.pages.inc';


or simply this, more like the things module does:

$items['bonus']['module'] = 'bonus';
$items['bonus']['file'] = 'includes/bonus.pages.inc';