From sources.filesource.inc:

  function _restore_from_file_php($file, &$settings) {

      // Older B&M Files format included a base 'files' directory.
      if (file_exists($temp .'/files')) {
        $temp = $temp . '/files';
      }

I see this exists for historical compatibility, but it causes a problem if your files directory contains a directory called 'files', for example, /sites/default/files/files. Instead of restoring from /sites/default/files, BAM will restore from /sites/default/files/files.

This resulted in a bit of confusion on my part until I figured it out. Perhaps it's time to sunset this compatibility layer?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

entendu created an issue. See original summary.

entendu’s picture

Patch in case you agree.

couturier’s picture

Status: Active » Needs work

This patch may need to be rewritten based on 7.x-3.2.

DamienMcKenna’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: backup_migrate-2753175.patch, failed testing. View results

BrankoC’s picture

I was thinking of rerolling the patch against the most recent 7.x-3.x-dev version, but I ran into two problems:

1) I cannot reproduce the issue (I do not know how to), so I cannot test the patch.

2) There is a second occurrence of the offending code, namely in the method _restore_from_file_cli(). It is not clear to me if that should be included in the reroll. I assume not, because the code _restore_from_file_cli() is older than this issue.