mirror of https://github.com/aria2/aria2
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.ccpull/1/head
parent
b5d93cd0da
commit
f34a032d2e
|
@ -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.
|
||||||
|
|
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue