• Christopher Dykes's avatar
    Add support for closing a TemporaryFile early · 050671f8
    Christopher Dykes authored
    Summary:
    The file itself will still get removed when `TemporaryFile` is destroyed, but closing it before then allows it to be read when on Windows, because `TemporaryFile` opens the temporary file with `O_EXCL`, so Windows denies read access of the file to everything else.
    This is needed to fix one of the AsyncFileWriter tests on Windows.
    
    Reviewed By: simpkins
    
    Differential Revision: D5307719
    
    fbshipit-source-id: bd65962cc3d34f382cc7b0b55dbf2659ed5ebfce
    050671f8
TestUtilTest.cpp 5.44 KB