author | Michael Krelin <hacker@klever.net> | 2012-01-20 20:44:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2012-01-20 20:44:42 (UTC) |
commit | ad7811fbcf54d0aebcd35c20d4a211d11029d1a2 (patch) (side-by-side diff) | |
tree | ca94dd45ab61e4569e16a8a8830f94f5365ad5f4 /src/eyefiservice.cc | |
parent | f1f12e73c9a62f29decab82c56793e4e72eea911 (diff) | |
download | iii-ad7811fbcf54d0aebcd35c20d4a211d11029d1a2.zip iii-ad7811fbcf54d0aebcd35c20d4a211d11029d1a2.tar.gz iii-ad7811fbcf54d0aebcd35c20d4a211d11029d1a2.tar.bz2 |
fixed misplaced parenthesis
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | src/eyefiservice.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eyefiservice.cc b/src/eyefiservice.cc index 5c4e308..9ef4bb6 100644 --- a/src/eyefiservice.cc +++ b/src/eyefiservice.cc @@ -193,25 +193,25 @@ int eyefiService::UploadPhoto( std::string::size_type ls = tf.rfind('/'); // XXX: actually, lack of '/' signifies error here std::string tbn = (ls==std::string::npos)?tf:tf.substr(ls+1); ls = lf.rfind('/'); std::string lbn = (ls==std::string::npos)?lf:lf.substr(ls+1); std::string ttf,tlf; bool success = false; for(int i=0;i<32767;++i) { const char *fmt = i ? "%1$s/(%3$05d)%2$s" : "%1$s/%2$s"; ttf = (const char*)gnu::autosprintf(fmt,td.c_str(),tbn.c_str(),i); if(!lf.empty()) tlf = (const char*)gnu::autosprintf(fmt,td.c_str(),lbn.c_str(),i); - if( (!link(tf.c_str(),ttf.c_str())) && (lf.empty()) || !link(lf.c_str(),tlf.c_str()) ) { + if( (!link(tf.c_str(),ttf.c_str())) && (lf.empty() || !link(lf.c_str(),tlf.c_str())) ) { unlink(tf.c_str()); if(!lf.empty()) unlink(lf.c_str()); success=true; break; } } std::string cmd = eyekinfig.get_on_upload_photo(); if(success && !cmd.empty()) { if(detached_child()) { putenv( gnu::autosprintf("EYEFI_UPLOADED_ORIG=%s",tbn.c_str()) ); putenv( gnu::autosprintf("EYEFI_MACADDRESS=%s",macaddress.c_str()) ); putenv( gnu::autosprintf("EYEFI_UPLOADED=%s",ttf.c_str()) ); |