New command -file_name_limit, -as mkisofs -file_name_limit

This commit is contained in:
2015-09-17 12:12:41 +00:00
parent 44d09c30c0
commit 0c2eed9f2e
23 changed files with 582 additions and 202 deletions

View File

@ -215,9 +215,10 @@ int Xorriso_option_lnsi(struct XorrisO *xorriso, char *target, char *path,
int flag)
{
int ret;
char *eff_path= NULL;
char *eff_path= NULL, *buffer= NULL, *namept;
Xorriso_alloc_meM(eff_path, char, SfileadrL);
Xorriso_alloc_meM(buffer, char, SfileadrL);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, path, eff_path, 1);
if(ret < 0)
@ -231,12 +232,16 @@ int Xorriso_option_lnsi(struct XorrisO *xorriso, char *target, char *path,
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, path, eff_path, 2);
if(ret < 0)
{ret= 0; goto ex;}
ret= Xorriso_graft_in(xorriso, NULL, target, eff_path, (off_t) 0, (off_t) 0,
ret= Xorriso_truncate_path_comps(xorriso, target, buffer, &namept, 0);
if(ret < 0)
{ret= 0; goto ex;}
ret= Xorriso_graft_in(xorriso, NULL, namept, eff_path, (off_t) 0, (off_t) 0,
1024);
if(ret <= 0)
{ret= 0; goto ex;}
ret= 1;
ex:;
Xorriso_free_meM(buffer);
Xorriso_free_meM(eff_path);
return(ret);
}
@ -977,10 +982,10 @@ int Xorriso_option_move(struct XorrisO *xorriso, char *origin, char *dest,
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, origin, eff_origin, 0);
if(ret <= 0)
goto ex;
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, dest, eff_dest, 0);
if(ret <= 0)
goto ex;
{ret= 0; goto ex;}
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, dest, eff_dest, 2);
if(ret < 0)
{ret= 0; goto ex;}
ret= Xorriso_rename(xorriso, NULL, eff_origin, eff_dest, 0);
if(ret <= 0)
goto ex;