Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Platform 9 (09/18/15)
Description
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.