Project

General

Profile

Actions

Bug #2296

closed

ndngetfile doesn't write anything into the file

Added by Alex Afanasyev over 9 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

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:

  • media.mp4 is empty

Platform:

  • OS X Yosemite
Actions #1

Updated by Alex Afanasyev over 9 years ago

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);
Actions #2

Updated by Alex Afanasyev over 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Alex Afanasyev
Actions #3

Updated by Alex Afanasyev over 9 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
Actions #4

Updated by Junxiao Shi almost 7 years ago

  • Tracker changed from Task to Bug
  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF