Skip to content
Snippets Groups Projects
Commit a1248130 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

prefer to pick src instead of resolve file for listing the current contents

parent 6bb04ff1
No related branches found
No related tags found
No related merge requests found
......@@ -123,12 +123,18 @@ void tree_allowed(stralloc *list,char const *base, char const *treename)
void tree_contents(stralloc *list,char const *tree,ssexec_t *info)
{
stralloc sa = STRALLOC_ZERO ;
size_t treelen = strlen(tree), pos ;
char solve[treelen + SS_SVDIRS_LEN + SS_RESOLVE_LEN + 1] ;
auto_strings(solve,tree,SS_SVDIRS,SS_RESOLVE) ;
size_t treelen = strlen(tree), pos, newlen ;
char solve[treelen + SS_SVDIRS_LEN + SS_DB_LEN + SS_SRC_LEN + 1] ;
newlen = treelen + SS_SVDIRS_LEN ;
auto_strings(solve,tree,SS_SVDIRS,SS_SVC) ;
if (!sastr_dir_get(&sa,solve,"",S_IFDIR))
log_dieusys_nclean(LOG_EXIT_SYS,&cleanup,"get source svc service file of: ",tree) ;
auto_string_from(solve,newlen,SS_DB,SS_SRC) ;
if (!sastr_dir_get(&sa,solve,SS_MASTER + 1,S_IFREG))
log_dieusys_nclean(LOG_EXIT_SYS,&cleanup,"get source service file of: ",tree) ;
log_dieusys_nclean(LOG_EXIT_SYS,&cleanup,"get source of atomic service file of: ",tree) ;
for (pos = 0 ;pos < sa.len; pos += strlen(sa.s + pos) + 1)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment