Skip to content

Commit 67efbda

Browse files
committed
Print actual Win32 error that occurred on file creation failure.
1 parent 3c3164d commit 67efbda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/leveldb/util/env_win.cc

Lines changed: 1 addition & 1 deletion
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)