ewmscp  ..
Rewriting symbolic links
Collaboration diagram for Rewriting symbolic links:

Assume that we have a directory accessible by three paths:

/client/machine/mount/point/dir-in-question as seen by the user client
/nfs/server/mount/point/dir-in-question as seen by inotify_watch
/copy/node/mount/point/dir-in-question as seen by ewmscp,
A link is created by the user as /client/machine/mount/point/dir-in-question/some/nested/dir/link that points to the absolute path /client/machine/mount/point/dir-in-question/other/nested/dir/file

inotify_watch reports this as ln <time> /nfs/server/mount/point/dir-in-question/some/nested/dir/link

ewmscp has in the –linkBaseMap parameter an entry like /client/machine/mount/point -> /copy/node/mount/point/dir-in-question and removes the /client/machine/mount/point part from the link target. Then for each dir in the path to the new link itself (the /copy/node/mount/point/dir-in-question/some/nested/dir/link it gets from getDstPath()) starting after the length of the /copy/node/mount/point/dir-in-question part a ../ is prepended to the target, so that the absolute link is changed to a working realative one. In this example, we get ../../../../dir-in-question/other/nested/dir/file