Added new action "compare" to -find

This commit is contained in:
2008-02-28 13:27:44 +00:00
parent 3207ed812c
commit 0fd8316c94
4 changed files with 67 additions and 7 deletions

View File

@ -3719,7 +3719,7 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
gid_t group= 0;
time_t date= 0;
mode_t mode_or= 0, mode_and= ~1;
char *target, sfe[5*SfileadrL];
char *target, sfe[5*SfileadrL], *iso_prefix;
struct FindjoB *subjob;
struct stat dir_stbuf;
@ -3751,6 +3751,11 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
} else if(action>=9 && action<=13) { /* actions which have own findjobs */
Findjob_set_start_path(subjob, abs_path, 0);
ret= Xorriso_findi(xorriso, subjob, NULL, abs_path, &dir_stbuf, depth, 0);
} else if(action==14) { /* compare */
Findjob_get_start_path(job, &iso_prefix, 0);
ret= Xorriso_find_compare(xorriso, abs_path, iso_prefix, target, 0);
if(ret>=0)
ret= 1;
} else {
sprintf(xorriso->result_line, "%s\n", Text_shellsafe(show_path, sfe, 0));
Xorriso_result(xorriso, 0);