Commits

Qian Zhu committed e27f59d

Fixed bug in Data2DB when trying -f = 5 or other small value

Comments (0)

Files changed (1)

 				CDatabaselet&	DB	= *m_vecpDBs[ iOutBase + iOutOffset ];
 
 				/* close files if too many file handles opened */
-				if(iOutOffset>0 && (iOutOffset%iNumFilesOpen==0 || 
+				/*if(iOutOffset>0 && (iOutOffset%iNumFilesOpen==0 || 
 					(iOutBase + iOutOffset)==m_vecpDBs.size()-1)){
 					for(k=0; k<iNumFilesOpen; k++){
 						if(iOutOffset + iOutBase - 1 - k == 0){
 						}
 						m_vecpDBs[iOutOffset + iOutBase - 1 - k]->CloseFile();
 					}
-				}
+				}*/
 
 				DB.OpenNoOverwrite();
 
 				}
 
 				i += DB.GetGenes( );
+
+				DB.CloseFile();
 			}
 		}
 	}