Bug #2296
closed
ndngetfile doesn't write anything into the file
Added by Alex Afanasyev almost 10 years ago.
Updated over 7 years ago.
Description
Reported on behalf of Diarmuid Collins.
Steps to reproduce:
ndnputfile /tcd/repo/1 /tcd/data/1/ /Users/diarmuidcire/Documents/VIDEO0037.mp4
ndngetfile -o media.mp4 /tcd/data/1
Expected:
- media.mp4 has content equivalent to /Users/diarmuidcire/Documents/VIDEO0037.mp4
Actual:
Platform:
Reported on behalf of Diarmuid Collins.
I believe there is a bug in the ndngetfile.cpp
in repo-ng.
The old code was:
std::ofstream of;
if (outputFile != 0)
{
of.open(outputFile);
if (!of)
With the following line - it now will add binary output for the file.
if (outputFile != 0)
{
of.open(outputFile, std::ios::out | std::ios::binary | std::ios::trunc);
- Status changed from New to In Progress
- Assignee set to Alex Afanasyev
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
- Tracker changed from Task to Bug
- Status changed from Code review to Closed
Also available in: Atom
PDF