diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index a78fccad..190e3fe4 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -105,7 +105,7 @@ class OstreeInstallerThread(WorkerThread): os_path = compose.paths.compose.os_tree(arch, variant) boot_iso = os.path.join(output_dir, 'images', 'boot.iso') - shortcuts.run('cp -av %s/* %s/' % + shortcuts.run('cp -rv %s/* %s/' % (shlex_quote(output_dir), shlex_quote(os_path))) try: os.link(boot_iso, iso_path) diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index e3af4468..e9b58006 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -127,7 +127,7 @@ class OstreeThreadTest(helpers.PungiTestCase): self.assertTrue(os.path.isdir(self.topdir + '/work/x86_64/Everything/')) self.assertFalse(os.path.isdir(self.topdir + '/work/x86_64/Everything/ostree_installer')) self.assertEqual(run.call_args_list, - [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))]) + [mock.call('cp -rv {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))]) @mock.patch('kobo.shortcuts.run') @mock.patch('productmd.images.Image')