Made option -lsl mark files in hidden directories as hidden

This commit is contained in:
Thomas Schmitt 2010-06-28 10:11:10 +00:00
parent f0a9a0e29a
commit 66efb225eb
2 changed files with 23 additions and 7 deletions

View File

@ -1313,6 +1313,27 @@ ex:;
}
int Xorriso_node_eff_hidden(struct XorrisO *xorriso, IsoNode *node, int flag)
{
int hidden_state= 0, ret;
IsoNode *current, *parent;
current= node;
for(current= node; hidden_state != 3;) {
ret= iso_node_get_hidden(current);
if(ret & LIBISO_HIDE_ON_RR)
hidden_state|= 1;
if(ret & LIBISO_HIDE_ON_JOLIET)
hidden_state|= 2;
parent= (IsoNode *) iso_node_get_parent(current);
if(parent == current)
break;
current= parent;
}
return(hidden_state);
}
/* @param flag bit0= long format
bit1= do not print count of nodes
bit2= du format
@ -1404,12 +1425,7 @@ int Xorriso_ls_filev(struct XorrisO *xorriso, char *wd,
link_target[0]= 0;
if((flag&5)==1) { /* -ls_l */
iso_node_get_acl_text(node, &a_text, &d_text, 16);
hidden_state= 0;
ret= iso_node_get_hidden(node);
if(ret & LIBISO_HIDE_ON_RR)
hidden_state|= 1;
if(ret & LIBISO_HIDE_ON_JOLIET)
hidden_state|= 2;
hidden_state= Xorriso_node_eff_hidden(xorriso, node, 0);
ret= Xorriso_format_ls_l(xorriso, &stbuf,
1 | ((a_text != NULL || d_text != NULL) << 1) |
(hidden_state << 2));

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.06.28.100903"
#define Xorriso_timestamP "2010.06.28.101019"