Fix getetcpath.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Sat, 15 Oct 2005 00:17:34 +0000 (00:17 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Sat, 15 Oct 2005 00:17:34 +0000 (00:17 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@359 959494ce-11ee-0310-bf91-de5d638817bd

daemon/utils.c

index 216ae77..c006b4f 100644 (file)
@@ -676,13 +676,19 @@ int _parrlen(void **arr)
 
 char *getetcpath(char *binpath)
 {
+    int f;
     char *etcpath, *p;
     size_t etcpathsize, etcpathdata;
 
     etcpath = NULL;
     etcpathsize = etcpathdata = 0;
+    f = 1;
     do
     {
+       if(f)
+           f = 0;
+       else
+           binpath++;
        for(p = binpath; *p && (*p != ':'); p++);
        for(; (p >= binpath) && (*p != '/'); p--);
        if(p >= binpath)