activateFileViewerSelecting not correctly work on Catalina

Today I discovered very old code no longer works as expected on Catalina.

The following code

Code Block
let url = URL(fileURLWithPath: "/dir1/dir2/path_to_some_folder_or_file")
NSWorkspace.shared.activateFileViewerSelecting([url])

On Catalina opens Finder but the selected item is dir2 (the parent folder) on Mojave and older versions correctly the selected item is the the last component path_to_some_folder_or_file

I discovered other apps have the same problem (Trasmission torrent client)

Any hints?

activateFileViewerSelecting not correctly work on Catalina
 
 
Q