Skip to content

Commit d5317e8

Browse files
committed
Print actual Win32 error that occurred on file creation failure.
1 parent 907f308 commit d5317e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/env_win.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ Status Win32Env::NewRandomAccessFile( const std::string& fname, RandomAccessFile
971971
if(!pFile->isEnable()){
972972
delete pFile;
973973
*result = NULL;
974-
sRet = Status::IOError(path,"Could not create random access file.");
974+
sRet = Status::IOError(path, Win32::GetLastErrSz());
975975
}else
976976
*result = pFile;
977977
return sRet;

0 commit comments

Comments
 (0)