Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When exporting the public files directory the tar was being created with the path /var/www/drupal/web/sites/default/files, and then when that dump was imported, it would be placed back at that location and duplicate the path. This meant files are being placed at /var/www/drupal/web/sites/default/files/var/www/drupal/web/sites/default/files.
This PR changes the path inside the exported dump to be ./ which will allow us to extract the files wherever we want.
To reproduce the issue:
make starter
docker-compose exec drupal with-contenv bash -lc 'ls /var/www/drupal/web/sites/default/files'
make drupal-public-files-dump DEST=files.tgz
make drupal-public-files-import SRC=files.tgz
docker-compose exec drupal with-contenv bash -lc 'ls /var/www/drupal/web/sites/default/files'
againYou should see that you now have your files duplicated at /var/www/drupal/web/sites/default/files/var/www/drupal/web/sites/default/files
To test this PR works:
docker-compose exec drupal with-contenv bash -lc 'touch /var/www/drupal/web/sites/default/files/test.txt'
docker-compose exec drupal with-contenv bash -lc 'ls /var/www/drupal/web/sites/default/files'
make drupal-public-files-dump DEST=files.tgz
docker-compose exec drupal with-contenv bash -lc 'rm /var/www/drupal/web/sites/default/files/test.txt'
docker-compose exec drupal with-contenv bash -lc 'ls /var/www/drupal/web/sites/default/files'
make drupal-public-files-import SRC=files.tgz
docker-compose exec drupal with-contenv bash -lc 'ls /var/www/drupal/web/sites/default/files'
You should see that your file was added back to the correct location from the import