I'm working on an application where I can add attachments and open them etc.
I'm using the following code to open pdf files:
var path = OS.get_executable_path().get_base_dir()+"/"+filename
It works just fine on Windows export, but on Mac export it gives me an error: "Unable to open Application. -50"
filename is of the sort: "name.pdf"
Would you please help by providing insight as to why this is happening? And maybe a solution?
Thank you very much in advance :)
I looked further into it and I'm not sure why the
OS.get_executable_path().get_base_dir() function returns the path to the file within the package i.e. "/Contents/MacOS".