Path translating issues from MacOS

We’ve got problem with Nuke job submitted from a Mac.
My path mapping that doesn’t work looks like this:

Replace path: /Volumes/FRAMES_A/
Linux: /mnt/framesA/

Unfortunately my job errors with

ERROR: Read15: /Volumes/FRAMES_A/*************************************************.exr: Read error: No such file or directory

So apparently path translation never happens.

In job submission params I can see mix of Linux and MacOS paths to particular assets. So I’m wondering if it could be due to the scene being worked on different platforms (Linux, MacOS)? Or the problem is somewhere else?

Well, the way path mapping works for Nuke is that we read the nk script line by line and do a find/replace. Any scenes or assets referenced outside that nk file will not be remapped. This can be a problem for Alembic files for example.

The usual workaround for this is to make sure your assets in these linked resources are relative to the nk location, but the issue with path mapping is that we have to copy that re-mapped file somewhere and so the relative links will be broken when we open it up from a local temporary location.