When Two Folders With The Same Name Have The Same Folder Action...

In attempting to get a list of every folder that has an attached folder action, I’ve found something very peculiar.
If there are two folders that have the same name, only one folder will be displayed, twice.
This means that if I have two folders named “Blah,” which each have the same folder action, they each show up in the list with the exact same properties including Path.
So, that’s a problem.

Here’s an example of the script I’m playing with. In this instance, I’m attempting to programmatically remove a specific Folder Action from many folders at once:


set thisversionis to ThisScript.applescript --the script to delete
set thisFolder to choose folder --For this purpose, I'm choosing a folder named "Blah." There are two such folders, within different directories, ie "/Volumes/Macintosh HD/This Folder/Blah" and "/Volumes/Macintosh HD/That Folder/Something Else/Blah"
tell application "Finder" to set myName to the name of thisFolder
tell application "System Events" to set FolderActionNames to every folder action whose name is myName
	tell application "System Events" to set folderActions to name of every script of folder action myName
	if folderActions is not {} then
		repeat with i from 1 to count folderActions
			if item i of folderActions is thisversionis then tell application "System Events" to delete script thisversionis of folder action myName
		end repeat
	end if

When I look at the FolderActionNames variable, I see two items. With perfectly identical properties. In fact, they are likely the same item twice.

And ideas?

_Josh

Model: Mac Pro
AppleScript: 2.0.1
Browser: Firefox 3.6.6
Operating System: Mac OS X (10.5)