Removed some bugs and made adaptions to nglibisofs

This commit is contained in:
Thomas Schmitt 2008-01-14 19:03:17 +00:00
parent d78ffac9b2
commit f172682369
4 changed files with 17 additions and 11 deletions

View File

@ -2507,7 +2507,7 @@ int Xorriso_rename(struct XorrisO *xorriso, char *origin, char *dest, int flag)
{ {
int ret, ol, dest_ret; int ret, ol, dest_ret;
char sfe[5*SfileadrL], eff_dest[SfileadrL], dir_adr[SfileadrL], *cpt; char sfe[5*SfileadrL], eff_dest[SfileadrL], dir_adr[SfileadrL], *cpt;
char *leafname, eff_origin[SfileadrL], sfe2[5*SfileadrL]; char *leafname, eff_origin[SfileadrL], sfe2[5*SfileadrL], *old_leafname;
IsoImage *volume; IsoImage *volume;
IsoDir *origin_dir, *dest_dir; IsoDir *origin_dir, *dest_dir;
IsoNode *node; IsoNode *node;
@ -2620,7 +2620,10 @@ int Xorriso_rename(struct XorrisO *xorriso, char *origin, char *dest, int flag)
leafname= eff_dest; leafname= eff_dest;
else else
leafname++; leafname++;
ret= iso_node_set_name(node, leafname);
old_leafname= (char *) iso_node_get_name(node);
if(strcmp(leafname, old_leafname)!=0)
ret= iso_node_set_name(node, leafname);
if(ret<0) { if(ret<0) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "Internal error on rename: failed to set name"); sprintf(xorriso->info_text, "Internal error on rename: failed to set name");

View File

@ -539,7 +539,9 @@ Like -chgrp but affecting all files below eventual directories.
\fB\-chmod\fR mode iso_rr_path [***] \fB\-chmod\fR mode iso_rr_path [***]
Equivalent to shell command chmod in the ISO image. Equivalent to shell command chmod in the ISO image.
mode is either an octal number beginning with "0" or a comma separated mode is either an octal number beginning with "0" or a comma separated
list of statements of the form [ugoa]*[+-=][rwxst]* . Like: go-rwx,u+rwx . list of statements of the form [ugoa]*[+-=][rwxst]* .
.br
Like: go-rwx,u+rwx .
.br .br
.B Personalities: .B Personalities:
u=user, g=group, o=others, a=all u=user, g=group, o=others, a=all
@ -646,7 +648,7 @@ needs to get terminated by "--".
\fB\-mkdir\fR iso_rr_path [...] \fB\-mkdir\fR iso_rr_path [...]
Create empty directories if they do not exist yet. Create empty directories if they do not exist yet.
Existence as directory generates a WARNING event, existence as Existence as directory generates a WARNING event, existence as
other file cause a SORRY event. other file causes a SORRY event.
.TP .TP
\fB\-rmdir\fR iso_rr_path [***] \fB\-rmdir\fR iso_rr_path [***]
Delete empty directories. Delete empty directories.

View File

@ -4992,7 +4992,7 @@ int Xorriso_convert_modstring(struct XorrisO *xorriso, char *cmd, char *mode,
for(mpt= mode; mpt!=NULL; mpt= strchr(mpt, ',')) { for(mpt= mode; mpt!=NULL; mpt= strchr(mpt, ',')) {
if(*mpt==',') if(*mpt==',')
mpt++; mpt++;
if(strlen(mpt)<3) if(strlen(mpt)<2)
goto unrecognizable; goto unrecognizable;
who_val= 0; who_val= 0;
for(vpt= mpt; *vpt!='+' && *vpt!='-' && *vpt!='='; vpt++) { for(vpt= mpt; *vpt!='+' && *vpt!='-' && *vpt!='='; vpt++) {
@ -6483,7 +6483,7 @@ int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
int Xorriso_option_cpri(struct XorrisO *xorriso, int argc, char **argv, int Xorriso_option_cpri(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag) int *idx, int flag)
{ {
int i, ret, is_dir= 0, was_failure= 0, fret; int i, ret, is_dir= 0, was_failure= 0, fret, end_idx_dummy;
char eff_origin[SfileadrL], eff_dest[SfileadrL]; char eff_origin[SfileadrL], eff_dest[SfileadrL];
char dest_dir[SfileadrL], leafname[SfileadrL]; char dest_dir[SfileadrL], leafname[SfileadrL];
int optc= 0; int optc= 0;
@ -6533,6 +6533,8 @@ problem_handler:;
} }
ret= !was_failure; ret= !was_failure;
ex:; ex:;
Xorriso_opt_args(xorriso, "-cpri",
argc, argv, *idx, &end_idx_dummy, &optc, &optv, 256);
return(ret); return(ret);
} }
@ -7544,10 +7546,10 @@ ex:;
int Xorriso_option_mvi(struct XorrisO *xorriso, int argc, char **argv, int Xorriso_option_mvi(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag) int *idx, int flag)
{ {
int i, end_idx, ret, is_dir= 0, was_failure= 0, fret; int i, end_idx_dummy, ret, is_dir= 0, was_failure= 0, fret;
char sfe[5*SfileadrL], sfe2[5*SfileadrL]; char sfe[5*SfileadrL], sfe2[5*SfileadrL];
char eff_origin[SfileadrL], eff_dest[SfileadrL], dest_dir[SfileadrL]; char eff_origin[SfileadrL], eff_dest[SfileadrL], dest_dir[SfileadrL];
char *leafname; char leafname[SfileadrL];
int optc= 0; int optc= 0;
char **optv= NULL; char **optv= NULL;
@ -7595,8 +7597,7 @@ problem_handler:;
ret= !was_failure; ret= !was_failure;
ex:; ex:;
Xorriso_opt_args(xorriso, "-mvi", Xorriso_opt_args(xorriso, "-mvi",
argc, argv, *idx, &end_idx, &optc, &optv, 256); argc, argv, *idx, &end_idx_dummy, &optc, &optv, 256);
(*idx)= end_idx;
return(ret); return(ret);
} }

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.01.14.164628" #define Xorriso_timestamP "2008.01.14.190220"