Sync with DEFAULT

This commit is contained in:
Oliver Duis
2012-07-17 21:54:18 +02:00
parent b3f1403146
commit df76c5b6a8
19 changed files with 155 additions and 105 deletions

View File

@@ -213,8 +213,8 @@ void DFManager::init( Glib::ustring pathname )
dfList.clear();
bpList.clear();
for (size_t i=0; i<names.size(); i++) {
size_t lastdot = names[i].find_last_of ('.');
for (size_t i=0; i<names.size(); i++) {
size_t lastdot = names[i].find_last_of ('.');
if (lastdot != Glib::ustring::npos && names[i].substr(lastdot) == ".badpixels" ){
int n = scanBadPixelsFile( names[i] );
if( n>0 && settings->verbose)
@@ -256,7 +256,7 @@ dfInfo *DFManager::addFileInfo(const Glib::ustring &filename ,bool pool )
return false;
Glib::RefPtr<Gio::FileInfo> info = safe_query_file_info(file);
if (info && info->get_file_type() != Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || !options.fbShowHidden)) {
size_t lastdot = info->get_name().find_last_of ('.');
size_t lastdot = info->get_name().find_last_of ('.');
if (options.is_extention_enabled(lastdot!=Glib::ustring::npos ? info->get_name().substr (lastdot+1) : "")){
RawImage ri(filename);
int res = ri.loadRaw(false); // Read informations about shot
@@ -397,13 +397,16 @@ int DFManager::scanBadPixelsFile( Glib::ustring filename )
{
FILE *file = fopen( filename.c_str(),"r" );
if( !file ) return false;
size_t lastdot = filename.find_last_of ('.');
size_t dirpos1 = filename.find_last_of ('/');
size_t dirpos2 = filename.find_last_of ('\\');
size_t lastdot = filename.find_last_of ('.');
size_t dirpos1 = filename.find_last_of ('/');
size_t dirpos2 = filename.find_last_of ('\\');
if( dirpos1 == Glib::ustring::npos && dirpos2== Glib::ustring::npos )
dirpos1 =0;
else
else if( dirpos1 != Glib::ustring::npos && dirpos2 != Glib::ustring::npos )
dirpos1= (dirpos1> dirpos2 ? dirpos1: dirpos2);
else if( dirpos1 == Glib::ustring::npos )
dirpos1= dirpos2;
std::string makmodel(filename,dirpos1+1,lastdot-(dirpos1+1) );
std::list<badPix> bp;
char line[256];