Applescript can't properly resolve alias when two same-named volumes are mounted

Originator:jhawk
Number:rdar://10811281 Date Originated:06-Feb-2012 02:45 AM
Status:Open Resolved:
Product:Mac OS X Product Version:10.7.2/11C74
Classification:Other Bug Reproducible:Always
 
06-Feb-2012 02:45 AM John Hawkinson:
Summary:
  Applescript cannot resolve aliases when there are two volumes mounted with the same name. Unfortunately we have several machines that have some of their secondary internal disks named "Storage," and when one machine mounts both volumes (e.g. via AFP), Applescripts that refer to files that are on one of those volumes break, with error -1728.
  It is difficult to replace the use of file aliases with POSIX paths in scripts, so it is hard to work around this problem.
  See attached zip file with two screenshots. The first, from 2:30:40 shows the failure to retrieve a list of folders from an alias with both volumes mounted. The second, from 02:21:19 shows the same script running after the first volume is unmounted -- it works fine.

Steps to Reproduce:
1. Mount two volumes of the same name. This occurs if they are both AFP volumes, as well as if one is AFP and one is local.
2. Select a non-empty folder in one volume in the Finder.
3. Run this script (2vols.scpt):
tell application "Finder"
	set f1 to selection
	set f2 to f1 as alias
	get POSIX path of f2
	get f2 as text
	set f3 to (every folder of f2)
end tell

Expected Results:
It should set f3 to a list of all folders in the selected folder.

Actual Results:
Error -1728.

Regression:
No. This exists (and was found in) 10.6.8.

Notes:


06-Feb-2012 02:45 AM John Hawkinson:
'2vols.zip' was successfully uploaded

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!