Browse Source

2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Close DiskAdaptor after renaming file.
	* src/RequestGroup.cc
Tatsuhiro Tsujikawa 17 years ago
parent
commit
6796e1c805
2 changed files with 8 additions and 0 deletions
  1. 5 0
      ChangeLog
  2. 3 0
      src/RequestGroup.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-07-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Close DiskAdaptor after renaming file.
+	* src/RequestGroup.cc
+
 2008-07-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Corrected indentation

+ 3 - 0
src/RequestGroup.cc

@@ -405,6 +405,9 @@ void RequestGroup::loadAndOpenFile(const BtProgressInfoFileHandle& progressInfoF
 	    // by tryAutoFileRenaming()
 	    progressInfoFile->updateFilename();
 	    if(progressInfoFile->exists()) {
+	      // Close DiskAdaptor here. Renmaed file will be opened in the
+	      // next loop .
+	      _pieceStorage->getDiskAdaptor()->closeFile();
 	      continue;
 	    }
 	    _pieceStorage->getDiskAdaptor()->initAndOpenFile();