Thanks, fixed

Matt Richards wrote:
> I was testing out the functionality of body rename:
> 
>   files:
> 
>     "/tmp/foo"
>         rename => moveit,
>         action => immediate;
> 
> }
> 
> body rename moveit {
>    newname => "moved";
> }
> 
> It appears that nothing is done. A quick run through the debugger show
> that it does indeed do nothing. Function of interest is VerifyName
> (file_operators.c:927):
> 
> /* Normal disable - has priority */
> 
> if (attr.rename.disable)
>    {
>    char newname[CF_BUFSIZE];
> 
>    if (attr.rename.newname && strlen(attr.rename.newname) > 0)
>       {
>       if (IsAbsPath(attr.rename.newname))
>          {
>          strncpy(path,attr.rename.newname,CF_BUFSIZE-1);
>          }
>       else
>          {
>          strcpy(newname,path);
>          ChopLastNode(newname);
> 
>          if (!JoinPath(newname,attr.rename.newname))
>             {
>             return;
>             }
>          }
>       }
> 
> attr.rename.disable is not set as it is a rename, not a disable, so
> the attr.rename.newname if clause is never activated.
>    else
> _______________________________________________
> Bug-cfengine mailing list
> Bug-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/bug-cfengine

-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to