fix #9556 (#10445)
fix #9556 (#10445)

The old logic wasn't very useful because
`relPath` is almost always shorter than `absPath`,
e.g. `../../../../../` is shorter than `C:\Program Files`.

This way allows the usage of a relative path for
at most two levels deep, e.g. `../../relPath`,
otherwise the absolute path is used.
dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim