static void fselect_purge_cb(unsigned int btn) { DIR *d, *d2, *d3, *d4; struct dirent *de, *de2, *de3, *de4; char sub_dir[20], sub_dir_search[20]; char selected_item[256]; int i, found=0; if (btn==MBOX_BTN_YES) { sprintf(current_dir+strlen(current_dir), "/%s", selected->name); d=opendir(current_dir); while ((de=readdir(d)) != NULL) { if (de->name[0] != '.' && de->name[1] != '.') {//If item is a file sprintf(sub_dir, "%s/%s", current_dir, de->name); d2=opendir(sub_dir); while ((de2=readdir(d2)) != NULL) { if (de2->name[0] == 'C' || de2->name[9] == 'C') {//If file is RAW (Either CRW/CR2 prefix or file extension) d3=opendir(current_dir); while ((de3=readdir(d3)) != NULL) { if (de3->name[0] != '.' && de3->name[1] != '.') {//If item is a file sprintf(sub_dir_search, "%s/%s", current_dir, de3->name); d4=opendir(sub_dir_search); while ((de4=readdir(d4)) != NULL) { if (de2->name[4] == de4->name[4] && de2->name[5] == de4->name[5] &&//If the four digits of the Canon number are the same de2->name[6] == de4->name[6] && de2->name[7] == de4->name[7] && de4->name[9] == 'J' && !(de4->name[0] == 'C' || de4->name[9] == 'C' || de4->name[0] == 0xE5)) {//I file is JPG and is not CRW/CR2 started(); found=1;//A JPG file with the same Canon number was found } } closedir(d4); } } closedir(d3); if (found == 0) { sprintf(selected_item, "%s/%s", sub_dir, de2->name); remove(selected_item); finished(); } else { found=0; finished(); } } } closedir(d2); } } closedir(d); i=strlen(current_dir); while (current_dir[--i] != '/'); current_dir[i]=0; gui_fselect_read_dir(current_dir); } gui_fselect_redraw = 2;}
I'm askeered. Smiley (colloquialism for "scared", "afraid", for the non-english crowd) There's no safety "lock file" or "Purge RAW this folder only!" option?
I'm going to have to make a "Wontolla's Builds" folder now. I'm losing track of whose stuff I'm testing lately.
hm, i tested your build for a620, to no effect.
Jeje me too!, I have a mess. I tried Jucifer's configurable menu yesterday. There is something knew in this forum almost every day!
The custom user menu is fingalo's, not mine...
Started by hangglider Feature Requests
Started by SkyWalker9 General Chat
Started by Mike Lee General Discussion and Assistance
Started by esranjith « 1 2 » Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by Dave92F1 RAW Shooting and Processing