Segmentation fault when trying to open a file with file:// prefix from command line


Hi, I am trying to get xdg-open on linux to open all text files with atom. xdg-open calls associated editors with /usr/bin/atom file:///path/to/file/ . This opens atom, displays an empty tab (the file is not empty!) entitled and on the command line displays

/usr/bin/atom: line 125: 11664 Segmentation fault      (core dumped) nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ $ATOM_USER_FLAGS "$@" > "$ATOM_HOME/nohup.out" 2>&1
App load time: 131ms
Failed to get crash dump id.
Report Id: 

Omitting file:// when opening the file works as expected. What can I do to make atom work nicely with xdg tools?

Thank you!