From 55bdd80087710b94e747a622fad8bd0ee3e3dec3 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Tue, 30 Aug 2011 20:52:04 +0000 Subject: updated list of supported suffixes Signed-off-by: Michael Krelin --- diff --git a/src/eyefiservice.cc b/src/eyefiservice.cc index d7f0f04..77526b9 100644 --- a/src/eyefiservice.cc +++ b/src/eyefiservice.cc @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -168,7 +169,10 @@ int eyefiService::UploadPhoto( std::string::size_type fl = f.length(); if(fl<4) continue; const char *s = f.c_str()+fl-4; - if(!(strcasecmp(s,".JPG") && strcasecmp(s,".AVI"))) + static const char *suffixes[] = { ".JPG",".AVI",".MP4",".NEF",".RAW",".TIF" }; + if(std::find_if(suffixes,suffixes+sizeof(suffixes)/sizeof(*suffixes), + std::not1(std::bind1st(std::ptr_fun(strcasecmp),s))) + != suffixes+sizeof(suffixes)/sizeof(*suffixes)) tf = f; else if(!strcasecmp(s,".log")) lf = f; -- cgit v0.9.0.2