mirror of https://github.com/aria2/aria2
2010-10-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Simplified directory creation. * src/DHTAutoSaveCommand.ccpull/1/head
parent
b3036d5840
commit
8bfe35d3f2
|
@ -1,3 +1,8 @@
|
|||
2010-10-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Simplified directory creation.
|
||||
* src/DHTAutoSaveCommand.cc
|
||||
|
||||
2010-10-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Skip ";" after name value pair.
|
||||
|
|
|
@ -91,22 +91,7 @@ void DHTAutoSaveCommand::save()
|
|||
|
||||
std::string tempFile = dhtFile;
|
||||
tempFile += "__temp";
|
||||
{
|
||||
File f(tempFile);
|
||||
if(!f.isFile()) {
|
||||
File dir(f.getDirname());
|
||||
if(!dir.exists()) {
|
||||
if(!dir.mkdirs()) {
|
||||
getLogger()->info(EX_MAKE_DIR,
|
||||
dir.getPath().c_str(), strerror(errno));
|
||||
return;
|
||||
}
|
||||
} else if(!dir.isDir()) {
|
||||
getLogger()->info(EX_NOT_DIRECTORY, dir.getPath().c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
File(tempFile).mkdirs();
|
||||
std::vector<SharedHandle<DHTNode> > nodes;
|
||||
std::vector<SharedHandle<DHTBucket> > buckets;
|
||||
routingTable_->getBuckets(buckets);
|
||||
|
|
Loading…
Reference in New Issue