<div dir="ltr">r66775 adds a warning for non-vector elements as well.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 9, 2015 at 6:20 AM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
Markus Neteler wrote:<br>
<br>
> It should probably not silently fail.<br>
><br>
> The code in question is in<br>
> lib/manage/do_copy.c<br>
<br>
</span>M_do_copy() returns a status. g.copy's main() checks that and uses it<br>
to set the exit status, but it doesn't generate an error or warning if<br>
the status is non-zero.<br>
<br>
If G_recursive_copy() or M_do_copy() raised an error, that would<br>
result in the program aborting on the first error; at present, it<br>
copies as much as it can.<br>
<br>
Realistically, g.copy() should be generating the error at the bottom<br>
of main() if result is non-zero. E.g.<br>
<br>
- exit(result);<br>
+ if (result)<br>
+ G_fatal_error(...);<br>
+ return 0;<br>
<span class=""><br>
> and potentially there to be added strerror(errno) as for example in<br>
> lib/gis/mapset_msc.c<br>
<br>
</span>That would require G_recursive_copy() to call G_warning() (with the<br>
appropriate strerror(errno)) for each failed system call. Either that,<br>
or G_recursive_copy() would have to generate a "log" of failures so<br>
that the caller can report them.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></span></blockquote></div><br></div>