if((dp = opendir(fulldir.c_str())) == NULL) {
logf << "Error(" << errno << ") opening " << fulldir << endl;
+ closedir(dp);
return "";
}
if(myfile.length() > 3 && myfile.substr(myfile.length()-4) == "part" &&
subname == myfile.substr( myfile.find("-")+1, myfile.rfind(".")-myfile.find("-")-1 ) ) {
+ closedir(dp);
return myfile;
}
}
+ closedir(dp);
return "";
}