Page 1 of 1

What causes invalid file path?

Posted: 22 Sep 2014, 20:25
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.

Re: What causes invalid file path?

Posted: 23 Sep 2014, 20:19
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.

Re: What causes invalid file path?

Posted: 23 Sep 2014, 21:10
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.

Re: What causes invalid file path?

Posted: 23 Sep 2014, 21:31
by PicassoCT
its dir necrosis - it cripples the file path, and kills the system.

Re: What causes invalid file path?

Posted: 23 Sep 2014, 22:05
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.