fsx: Remove environment references

This commit removes the reference to the environment from the fsx
package.
This commit is contained in:
Tom Wiesing 2023-03-02 11:47:11 +01:00
parent 5a43ecfaeb
commit 3263920d6b
No known key found for this signature in database
25 changed files with 167 additions and 183 deletions

View file

@ -34,7 +34,7 @@ var (
// NoPrefix checks if this WissKI instance is excluded from generating prefixes.
// TODO: Move this to the database!
func (prefixes *Prefixes) NoPrefix() bool {
return fsx.IsFile(prefixes.Malt.Environment, filepath.Join(prefixes.FilesystemBase, "prefixes.skip"))
return fsx.IsFile(filepath.Join(prefixes.FilesystemBase, "prefixes.skip"))
}
//go:embed prefixes.php
@ -120,7 +120,7 @@ func hasAnyPrefix(candidate string, prefixes []string) bool {
func (wisski *Prefixes) filePrefixes() (prefixes []string, err error) {
path := filepath.Join(wisski.FilesystemBase, "prefixes")
if !fsx.IsFile(wisski.Malt.Environment, path) {
if !fsx.IsFile(path) {
return nil, nil
}