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
pull/1/head
Tatsuhiro Tsujikawa 2008-07-13 10:38:30 +00:00
parent b5d93cd0da
commit f34a032d2e
3 changed files with 9 additions and 3 deletions

View File

@ -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> 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Supplied missing EAI_SYSTEM. Thanks ggknauf for the patch. Supplied missing EAI_SYSTEM. Thanks ggknauf for the patch.

View File

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

View File

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