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

don't try to start an empty tree

parent d08e9ea7
No related branches found
No related tags found
No related merge requests found
......@@ -82,11 +82,9 @@ int doit(char const *tree,char const *treename,char const *live, unsigned int wh
src[livelen + SS_STATE_LEN + 1 + ownerlen + 1 + treenamelen] = 0 ;
if (!dir_get(&ga,src,"init",S_IFREG))
{
VERBO1 strerr_warnwu3x("Empty tree: ",treename,": nothing to do") ;
goto freed ;
}
strerr_diefu2sys(111,"get state file from directory: ",src) ;
if (genalloc_len(stralist,&ga))
{
char const *newargv[10 + genalloc_len(stralist,&ga)] ;
unsigned int m = 0 ;
......@@ -122,7 +120,8 @@ int doit(char const *tree,char const *treename,char const *live, unsigned int wh
}
if (wstat) goto err ;
}
freed:
else VERBO1 strerr_warni3x("Empty tree: ",treename," -- nothing to do") ;
genalloc_deepfree(stralist,&ga,stra_free) ;
return 1 ;
err:
......
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