On May 3, 2007, at 7:32 AM, Sven E Olsson wrote:

> No ideas about this?
> This problems, generate "bug reports" nearly every day now..

HI Sven,

I use the command line tool mdutil from the shell to disable  
spotlight while I'm working on the filesystem.

Basic pseudo code:

Get the user's password via some mechanism
Get the shell path to the file you're accessing
        
// fire the sudo timer
theShell.execute "echo " + thePassword + " | sudo -S /usr/bin/true"
// turn off the Spotlight monitor for the path
theShell.execute "sudo mdutil -i off " + theShellPath
        //
        // manipulate the file and close it
        //
// fire the sudo timer again (not required if that last took less
// than 5 minutes
theShell.execute "echo " + thePassword + " | sudo -S /usr/bin/true"
// turn the Spotlight import back on
theShell.execute "sudo mdutil -i on " + theShellPath
// kill the sudo timer
theShell.execute "sudo -K"

That works well here (even though an extra step).

Tim
--
Tim Jones
[EMAIL PROTECTED]

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to