Closed eregon closed 9 years ago
I guess it could always write relative CWD and if you wanted a totally different location you could write it as an absolute path. The fact that the default saves as absolute is probably the main issue. Changing it to write a relative path would be a welcome PR. It also means a little more logic when reading the value to File.absolute?(value) [or something similar].
As for persisting defaults, that is something which could also be changed. I guess my '!' methods encourage persisting defaults. Leaving off the '!' on set would make it not save it by default. I am unsure what idiom should be encouraged?
PR done as #33.
As for get!
, I really don't know which is better.
Purugin will be rewritten against a different mod. Closing issues and PRs since they will likely not apply
Hello,
The purogo plugin saves its directory via Purugin::Config as an absolute path. If the server directory is moved, purogo won't find the shape files anymore.
One solution would be to save the path as relative to
cwd
or some element of the server hierarchy (theplugins/
dir, purugin.jar, the server directory), if within that directory. Another would be to accept multiple paths, and always consider theFile.join(File.dirname(__FILE__), "purogo")
one. And a last one which would only temporally solves it is to not persist default values. But I guess it's intended as it's more practical to customize if the default config is already there.What do you think?