From 25a5d50a02ec4ba9b4e8410241bd408aa64b49b7 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 18:42:05 +1000 Subject: [PATCH] refactor(fs): use new functions for retrieving paths Signed-off-by: Jason --- dir/fs.go | 4 ++-- dir/fs_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dir/fs.go b/dir/fs.go index 4533a7a6..bd313dfe 100644 --- a/dir/fs.go +++ b/dir/fs.go @@ -51,10 +51,10 @@ func NewSysFS(root string) SysFS { // ConfigFS is the config SysFS func ConfigFS() SysFS { - return NewSysFS(UserConfigDir) + return NewSysFS(UserConfigDirPath()) } // PluginFS is the plugin SysFS func PluginFS() SysFS { - return NewSysFS(filepath.Join(UserLibexecDir, PathPlugins)) + return NewSysFS(filepath.Join(UserLibexecDirPath(), PathPlugins)) } diff --git a/dir/fs_test.go b/dir/fs_test.go index d2c976cf..bfa1adb6 100644 --- a/dir/fs_test.go +++ b/dir/fs_test.go @@ -67,7 +67,7 @@ func TestPluginFS(t *testing.T) { if err != nil { t.Fatalf("SysPath() failed. err = %v", err) } - if path != filepath.Join(UserLibexecDir, PathPlugins, "plugin") { - t.Fatalf(`SysPath() failed. got: %q, want: %q`, path, filepath.Join(UserLibexecDir, PathPlugins, "plugin")) + if path != filepath.Join(UserLibexecDirPath(), PathPlugins, "plugin") { + t.Fatalf(`SysPath() failed. got: %q, want: %q`, path, filepath.Join(UserLibexecDirPath(), PathPlugins, "plugin")) } }