From 66efb225eb659d3f1f1e5732a97dbe9b1af07015 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 28 Jun 2010 10:11:10 +0000 Subject: [PATCH] Made option -lsl mark files in hidden directories as hidden --- xorriso/iso_tree.c | 28 ++++++++++++++++++++++------ xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/xorriso/iso_tree.c b/xorriso/iso_tree.c index 744fa9cb..403e87df 100644 --- a/xorriso/iso_tree.c +++ b/xorriso/iso_tree.c @@ -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)); diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index b4f8489e..e49d57e8 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.06.28.100903" +#define Xorriso_timestamP "2010.06.28.101019"