fix for SERVER-592

This commit is contained in:
Eliot Horowitz
2010-02-01 21:02:06 -05:00
parent 322761d176
commit 039856e9e7

View File

@@ -753,7 +753,7 @@ namespace mongo {
#if !defined(_WIN32) && !defined(__sunos__)
string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
if ( boost::filesystem::file_size( name ) > 0 ){
if ( boost::filesystem::exists( name ) && boost::filesystem::file_size( name ) > 0 ){
cout << "************** \n"
<< "old lock file: " << lockFile << ". probably means unclean shutdown\n"
<< "reccomend removing file and running --repair\n"