Script Error: Can't get disk item with 'nofollow' in file path

Weird file access problem running a script that accesses a file in my home folder.

Error is

Script Error
System Events got an error: Can't get disk item

The weird thing is the path it’s trying to access, which has stuck a “.nofollow” in the path:

"System:System:Volumes:Data:.nofollow:
Users:applesource:Desktop:blahblahblah"

Anyone know why the .nofollow is there?

Your path is so weird. Is the name of the disk “System” or “Data”?

applesource,
I had the same question before, and asked Mr. Howard at The Eclectic Light Company about it.
He gave me the following reply regarding the replacement with nofollow:

– Quote begins
This appears to be a change in recent macOS, made as a mitigation of a security vulnerability. It’s apparently to stop symbolic links from following the path. Although it seems an odd behaviour, I don’t know of any way of fixing – given that it’s to address a vulnerability, that is perhaps to be expected.
– Quote ends

I can’t say anything for certain, but it seems to be triggered when the target path carries the extended attribute:
com.apple.provenance

You can easily check for the presence of this attribute using Mr. Howard’s tool:
xattred

Hope this may be of some help.

Thanks for that.

This error appears intermittently for me. Mostly, the script works normally and creates a viable path.

I’m guessing the reason I get the “System:System” part is because of the way APFS structures the drive. Here’s a screenshot of diskutil on my internal SSD

image