Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Use an 'rmdir' function that's smart about .DS_Store files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use an 'rmdir' function that's smart about .DS_Store files
Authored by: dsouth on Dec 22, '09 11:23:15AM

Wasn't meant as a negative critique -- you wrote the script well. A one-line change to use mktemp rather than hard-coding the tmpfile path fixes the issue for MacOS users that frequent computer labs, have siblings, and are otherwise in shared environments.

Using mktemp also makes the script re-entrant so that more than one instance could be running at the same time without stepping on each other (important if you're doing scripted cleanups).

[ Reply to This | # ]