<div dir="ltr">You are right. This functionality was meant to give the file a correct name when using FILES_DS. In that datastore the files don't have the original name but a hash, just like other "images".<div>
<br></div><div>We can think about adding that feature but the path must be checked to make sure the file will be inside the cdrom.</div><div><br></div><div>Can you open an issue?</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Mon, Mar 3, 2014 at 2:46 PM, Olivier Sallou <span dir="ltr"><<a href="mailto:olivier.sallou@irisa.fr" target="_blank">olivier.sallou@irisa.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
After deeper tests, quotes are not the issue, it is just that if
target contains a directory path, it is not created, and cp fails.<br>
<br>
A "mkdir -p basename_of_target" would solve the issue and allow to
copy files in a subdirectory.<br>
<br>
Current code only allows the renaming of a file, not copying it in
sub-directories of the CDROM.<br>
<br>
Olivier<div><div class="h5"><br>
<br>
<div>On 03/03/2014 02:33 PM, Olivier Sallou
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
Hi,<br>
I made some tests and looking at code of tm_context, I think there
is a possible bug:<br>
(src/tm_mad/common/context)<br>
<br>
In code:<br>
<br>
for f in "${SRC[@]}"; do<br>
case "$f" in<br>
<a href="http://*" target="_blank">http://*</a>)<br>
exec_and_set_error "$WGET -P $ISO_DIR $f" "Error
downloading $f"<br>
;;<br>
*)<br>
if echo "$f" | grep -q ':'; then<br>
target=$(echo "$f"|cut -d':' -f2-)<br>
target="'$target'"<br>
f=$(echo "$f"|cut -d':' -f1)<br>
<br>
<br>
If a target is set with something like : f = /path_to_my_<a>file:subdir/my_file</a><br>
<br>
target is then set with quotes, in the above example
target='subdir/myfile'<br>
<br>
Following command is:<br>
<br>
exec_and_set_error "cp -R $f $ISO_DIR/$target" \<br>
"Error copying $f to $ISO_DIR"<br>
<br>
The cp will fail: cp -R /path_to_my_file
$ISO_DIR/'subdir/myfile'<br>
There are quotes in cp target path.<br>
<br>
Am I correct. I made a try and it failed, but I wonder if it is
code part or an other error I made somewhere else.<br>
<br>
Olivier<br>
<br>
<pre cols="72">--
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95
gpg key id: 4096R/326D8438 (<a href="http://keyring.debian.org" target="_blank">keyring.debian.org</a>)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438
</pre>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a>
</pre>
</blockquote><div class="">
<br>
<pre cols="72">--
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95
gpg key id: 4096R/326D8438 (<a href="http://keyring.debian.org" target="_blank">keyring.debian.org</a>)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438
</pre>
</div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Javier Fontán Muiños<br>Developer<br>OpenNebula - The Open Source Toolkit for Data Center Virtualization<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | @OpenNebula | <a href="http://github.com/jfontan" target="_blank">github.com/jfontan</a>
</div>