From 67efbda4a22dcf0868df18cc1280ffa6a33d0ecd Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 27 Apr 2013 02:49:43 +0200 Subject: [PATCH] Print actual Win32 error that occurred on file creation failure. --- src/leveldb/util/env_win.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leveldb/util/env_win.cc b/src/leveldb/util/env_win.cc index f1a76106..c64027f6 100644 --- a/src/leveldb/util/env_win.cc +++ b/src/leveldb/util/env_win.cc @@ -971,7 +971,7 @@ Status Win32Env::NewRandomAccessFile( const std::string& fname, RandomAccessFile if(!pFile->isEnable()){ delete pFile; *result = NULL; - sRet = Status::IOError(path,"Could not create random access file."); + sRet = Status::IOError(path, Win32::GetLastErrSz()); }else *result = pFile; return sRet;