[patch] libstdc++/70609 fix filesystem::copy()
Jonathan Wakely
jwakely@redhat.com
Tue Apr 19 18:06:00 GMT 2016
The conditional code in filesystem::copy() that uses stdio_filebuf
didn't handle the case where the file to be copied is empty, and so
the ostream insertion doesn't do anything. I was also failing to check
for errors when closing the files.
Rather embarassingly, the copy.cc test was actually a duplicate of
absolute.cc and wasn't testing the copy function at all.
I also found some defects in the spec of filesystem::copy(), which
I've reported.
Tested x86_64-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 7973 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160419/866293f2/attachment.bin>
More information about the Libstdc++
mailing list