Hello,

I'm getting a -60031 error when using the AuthorizationMBS class; 
unsurprisingly, it's the error which has the less meaning among all of them. 
However, I don't understand, because everything seems correct. Here's the bit 
of code:

//f1 is the target folder for the first move (/Library/LaunchAgents)
//f2 is a file written in the temporary folder
dim au as AuthorizationMBS

au=new AuthorizationMBS
if au.SimpleNewAuthorization then
  au.SimpleAuthorize
  if au.Authorized then
    au.Execute("/bin/mv",Array(f2.ShellPath,f1.ShellPath)) //Move the temp file 
to the LaunchAgents folder

    if au.LastError<>0 then
      dim e as RuntimeException
      e=new RuntimeException
      e.ErrorNumber=au.LastError
      e.Message="Authentication not granted."
      raise e
    end if
    f1=SpecialFolder.Library.Child("LaunchAgents").Child(t+".plist") //point f1 
to the resulting file; the resulting folderitem is valid, as seen in the IDE 
(it exists and it the correct one).

    au.Execute("/bin/chown",Array("0",f1.ShellPath)) //The file must be owned 
by root to work with launchd
    if au.LastError<>0 then
      dim e as RuntimeException
      e=new RuntimeException
      e.ErrorNumber=au.LastError
      e.Message="Authentication not granted."
      raise e
    end if

I'm getting the -60031 error code when executing chown. Any idea?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to