What causes invalid file path?

What causes invalid file path?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

What causes invalid file path?

Post by Jools »

I use spring in portable mode, and when playing this works fine. These are the directories used by spring on my machine:
[DataDirs] Portable Mode!
Using read-write data directory: U:\bin\Spring\Data\
Using read-only data directory: C:\Spring\
Using read-only data directory: U:\bin\github\Ecostats\
Scanning: C:\Spring\base
Scanning: U:\bin\Spring\Data\maps
Scanning: U:\bin\Spring\Data\games
Scanning: U:\bin\Spring\Data\packages
The above mentioned ones are all fine.

But for some reason, many badly written apps search for stuff that are located in my documents/my games/spring, a path which is invalid on my computer and not even writeable. What is the cause of this weird behaviour, and how can it be corrected? Other than telling the makes of these apps to not use a directory that has no write permission when it is needed. Examples are pr-downloader and springlobby, but there are probably more of those out there.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: What causes invalid file path?

Post by abma »

my documents/my games/
this is a path which is used by a lot of games. if this path is "broken" you don't need to ask why some applications don't work. tell the applications to not use this path then. imo its not up to the application to find a path which forks for it, its up to the user, when the "default" path doesn't work.


edit:

you missed the point that these tools work without spring installed. when spring isn't installed they can't ask unitsync for the path -> they detect the path on their own. detecting first if spring is installed, then getting the path is VERY error-prone and worst thing: it is VERY slow. with a lot of games & maps installed this can easily take > 30 seconds.

you've asked this already there, too: https://github.com/springlobby/springlobby/issues/283

maybe you missed that and that:

to change path, you have to edit springlobby.conf.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: What causes invalid file path?

Post by Jools »

Ok, that was actually very helpful so I apologize if I was not so constructive before.

It's easy to set that path with springlobby, but I wanted to address the root cause and also applications that have no config, like rapid.

Another solution would of course be to make symlinks from my documents/my games to the correct folder, but that creates new problems, namely some apps 'pollute' springsettings.cfg in that location if they find it there, for example by editing the SpringData variable.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: What causes invalid file path?

Post by PicassoCT »

its dir necrosis - it cripples the file path, and kills the system.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: What causes invalid file path?

Post by abma »

the root cause is, that you are using different applications which have different config files from different people. i think there are only two real solutions:
1. fix the config for each application
or
2. don't switch applications

if you can't set a path in an application its a feature request or maybe a bug.
Post Reply

Return to “Help & Bugs”