Jump to content

io.open, invalid filepath error when trying to get discord-ipc pipe

Recommended Posts

Hey, I am trying to create my own dst rich presence for discord and I am using other mod for the binding of isaac as template, but I can't open this path

sock = io.open('\\\\?\\pipe\\discord-ipc-0', "w+b")

because game crashes and I am keep getting invalid filepath error

Link to comment
Share on other sites

To go around this use a symbolic link to connect a folder to your target destination.  In Windows this is called a `hard link`.

The restriction was put into place so that mods can't start doing funny things like overwriting/adding the binaries DST uses, or read browser cookie information.  I reported this one a while ago, I think PeterA was the one who made the filepath resolver + restrictor.


The default location for mods using io.open goes to ~~/Steam/steamapps/common/Don't Starve Together/data/<file>

So creating a symlink inside the data folder would let you escape this sandbox.


Depending on your application use case you may find creating a RAM disk with a mounting point inside the data folder to be useful as well.

I find that working with files is a lot easier/quicker to do if the use case with IPC is completely isolated on the same computer.

  • Sanity 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...