Report fopen errno in GridFS::storefile rather than using boost::filesystem

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Platform 9 (09/18/15)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We currently use boost::filesystem to assert the existence of the file, but then use fopen to actually open the file.

      This is a bit silly: in principle you could race with the deletion of the file between the ::exists call and the fopen call, so the ::exists call is not sufficient. Second, fopen will fail if the file doesn't exist, so the boost check isn't really buying anything.

      If we made the error handling for fopen a little better so that it reported the errno string, we could drop the insufficient boost::filesystem check.

            Assignee:
            Andrew Morrow (Inactive)
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: