<div dir="ltr"><div dir="ltr"><br clear="all"></div><div>Please disregard. V2 with (hopefully) fixed title is on the way.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 8, 2019 at 12:14 AM Leonardo Augusto &lt;<a href="mailto:leobsd@gmail.com">leobsd@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In this particular case, &quot;echo -e &#39;cd {}&#39;&quot; is interpreted<br>
as &quot;-e cd {}&quot;, which causes the first line of the command<br>
to fail, and causing cp to always place the source file<br>
in the filesystem&#39;s root.<br>
<br>
This issue only affects &quot;wic cp&quot; for ext* filesystems.<br>
<br>
[1] <a href="https://docs.python.org/2/library/subprocess.html" rel="noreferrer" target="_blank">https://docs.python.org/2/library/subprocess.html</a><br>
[2] <a href="https://docs.python.org/3/library/subprocess.html" rel="noreferrer" target="_blank">https://docs.python.org/3/library/subprocess.html</a><br>
[3] <a href="http://pubs.opengroup.org/onlinepubs/9699919799" rel="noreferrer" target="_blank">http://pubs.opengroup.org/onlinepubs/9699919799</a><br>
<br>
Signed-off-by: Leonardo Augusto &lt;<a href="mailto:leobsd@gmail.com" target="_blank">leobsd@gmail.com</a>&gt;<br>
---<br>
 scripts/lib/wic/engine.py | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py<br>
index 4662c665c0..b4be796752 100644<br>
--- a/scripts/lib/wic/engine.py<br>
+++ b/scripts/lib/wic/engine.py<br>
@@ -331,7 +331,7 @@ class Disk:<br>
     def copy(self, src, pnum, path):<br>
         &quot;&quot;&quot;Copy partition image into wic image.&quot;&quot;&quot;<br>
         if self.partitions[pnum].fstype.startswith(&#39;ext&#39;):<br>
-            cmd = &quot;echo -e &#39;cd {}\nwrite {} {}&#39; | {} -w {}&quot;.\<br>
+            cmd = &quot;echo &#39;cd {}\nwrite {} {}&#39; | {} -w {}&quot;.\<br>
                       format(path, src, os.path.basename(src),<br>
                              self.debugfs, self._get_part_image(pnum))<br>
         else: # fat<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div></div>