Closed larsnaesbye closed 1 year ago
I even think I know why. PCGen uses the legacy java.io.File
package, and it has no support for symbolic links.
Would there be any objections to rewriting file access to use, say, java.nio.file.Files
instead - other than of course time and resources?
@larsnaesbye your feature sounds interesting. Maybe I will try to implement it just for fun :) Can you please tell me the scenario, when you might need symbolic links? There are not so many places in code, where java.io.File is used, so I don't want to blindly replace all of these calls with java.nio.
p.s. I don't know, if the JIRA issue is required for this feature, but let other members comment this thread, if they have some thoughts.
I would only do it in the case of system and data folders, so you could have symlinks to folders you're working on.
I have a pull request in the making, but so far I've only thoroughly tested that it doesn't make things worse (ie. it loads all non-symlinked folders fine).
Silly me. If only I had made my symlinks right. Turns out PCgen does in fact follow UNIX-style symlinks (but not macOS aliases or Windows shortcuts).
The pull request does not change the behaviour for better or worse, so I'll just retract it.
Is your feature request related to a problem? Please describe. That depends. I was trying to have my custom data in a git repo, and have symlinks to them in the gameSystem and data folders. They do not load.
Describe the solution you'd like Filesystem resolution of symlinks when loading data upon startup of PCGen.
Describe alternatives you've considered Copying edited files back and forth, replacing with every edit.