Browse Source

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

	Use File::exists() instead of File::isFile() to allow 
non-regular file
	such as block spacial device.
	* src/AbstractDiskWriter.cc
	* src/MultiDiskWriter.cc
Tatsuhiro Tsujikawa 17 years ago
parent
commit
f34a032d2e
3 changed files with 9 additions and 3 deletions
  1. 7 0
      ChangeLog
  2. 1 1
      src/AbstractDiskWriter.cc
  3. 1 2
      src/MultiDiskAdaptor.cc

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-07-13  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Use File::exists() instead of File::isFile() to allow non-regular file
+	such as block spacial device.
+	* src/AbstractDiskWriter.cc
+	* src/MultiDiskWriter.cc
+	
 2008-07-13  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Supplied missing EAI_SYSTEM. Thanks ggknauf for the patch.

+ 1 - 1
src/AbstractDiskWriter.cc

@@ -80,7 +80,7 @@ void AbstractDiskWriter::openExistingFile(const std::string& filename,
 {
   this->filename = filename;
   File f(filename);
-  if(!f.isFile()) {
+  if(!f.exists()) {
     throw DlAbortEx
       (StringFormat(EX_FILE_OPEN, filename.c_str(), MSG_FILE_NOT_FOUND).str());
   }

+ 1 - 2
src/MultiDiskAdaptor.cc

@@ -401,8 +401,7 @@ bool MultiDiskAdaptor::fileExists()
   std::string topDirPath = getTopDirPath();
   for(std::deque<SharedHandle<FileEntry> >::iterator i =
 	fileEntries.begin(); i != fileEntries.end(); ++i) {
-    
-    if(File(topDirPath+"/"+(*i)->getPath()).isFile()) {
+    if(File(topDirPath+"/"+(*i)->getPath()).exists()) {
       return true;
     }
   }