Basically spring now (as of revision 1787) supports a list with any number of data directories. Each data directory can either be read-only or read-write. Data directories higher on the list take priority over data directories lower on the list. This means that if a file exists in 2 data directories, the one in the highest-priority data directory is used. This applies to both reading and writing, but obviously for writing only read-write directories are used.
The list of data directories can be specified in the following way, where items on the top of this list end up on top of the data directory list (ie. with highest priority). Spring figures the access out for itself, you can see this on the console when starting spring.
- 'SpringData=/path/to/data' declaration in '~/.springrc' (colon separated list, like PATH)
- 'SPRING_DATADIR' environment variable (colon separated list, like PATH)
- Every line in the plain text file '/etc/spring/datadir' is then added to the list (in the same order as appearing in the file).
- If you passed a 'datadir=/path/to/data' or a 'prefix=/install/path' option to scons configure, then the last directory in the list is set to respectively '$datadir' or '$prefix/games/taspring/' ('datadir=' takes precedence). If you didn't pass such an option, the default value for it is used, ie. '/usr/local/games/taspring'.
- As a fallback, if there has been no read-write data directory specified, spring automagically adds the current directory to the end of the list.
I hope this makes the subject somewhat clearer.
Also, if you find any bugs (it's a brand new feature after all), notify me about them!
Oh, and one note: only absolute paths are accepted, paths not starting with '/' or containing '..' are denied.