react-ionize icon indicating copy to clipboard operation
react-ionize copied to clipboard

Better path handling

Open mhink opened this issue 8 years ago • 1 comments

Dealing with Electron runtime paths can be a pain, and the current resolution strategy for e.g. <window file="something.html"> is unsatisfactory to me.

It looks like Electron has a method called app.getPath(name) which we could use to manage things a bit better. I bet this would be a good use for getRootHostContext.

mhink avatar Apr 18 '17 17:04 mhink

IMO all paths given to Electron API's should be absolute, this is super easy for a user to do.

path.resolve(__dirname, './relative/path.html')

It means there can be no resolution errors regardless of CWD or start of resolution, when people use absolute paths basically nothing can go wrong 😄

MarshallOfSound avatar Apr 21 '17 12:04 MarshallOfSound