• Godot Help
  • How to prevent Godot trying to create a directory on game launch?

I have a game that uses an absolute system path for saving and loading persistent data. This respects the SDK of the system provider and works fine.

The thing is, Godot still tries to somehow create its own recursive directory on game start, which throws errors (which is to be expected, as this path is blocked by the system provider -> see screenshot below).

So, how can one prevent Godot from doing this (besides defining a custom path in the project settings, which has no effect on the outcome)?

By "game start", do you mean running a project, launching the Godot editor or launching the project manager?

Which version of Godot?

I mean when launching the game executable.
Built with Godot 3.5.1

    This is a Linux/X11 export?

    I've only used that export on the same computer that has the Godot editor installed, and not on a different computer. I've noticed that it uses the same file paths as the editor. There are export options that might make it self-contained, but I haven't experimented with those.

    Looks like something odd in the environment, i.e. the home folder is resolving to root's but it's not executing with root permissions (the latter of which is good, you don't want to execute anything as root you don't have to). Normally it would try to put things in /home/someuser/.local. Maybe try poking around a terminal commands like whoami and echo $HOME to get some more information about the execution environment.

      soundgnome Thanks for your input. I'll investigate further.
      Edit:
      whoami returns "root"
      $HOME returns "/root"

      but you are not the root user correct?

      Yes that is what it looks like, Looks like you have logged into you linux with as root user. Which linux distro are you using?

      Thanks guys for helping.

      It is a closed console system that uses a custom version Linux, though it has most of the functionality of other common distros.

      The game runs fine, as well as saving / loading to/from a custom location as per the manufacturer's requirements, but I would love to get rid of those errors being thrown by somehow suppressing Godot trying to create that persistent data folder at launch.