put (specialFolderPath("asup") & "/Test") into tSupportFolder
create folder tSupportFolder

This works under Snow Leopard if you are a logged-in admin user without error, 
and it assigns the currently logged-in user as the owner of the folder. 

In Lion, you get a "can't create that directory" error in the result. The 
workaround is to prompt for a password via AppleScript:

put "do shell script" && quote & "mkdir '" & tSupportFolder & \
    "'" & quote && "with administrator privileges" into tScript
do tScript as "AppleScript"
if the result <> (quote & quote) then
  -- report the AppleScript error
end if

Note that the resulting folder is owned by 'system' not the logged-in user, so 
you'll need to 'chmod' and 'chown' if you want to set the privileges back to 
what it was pre-Lion.

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/  

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to