diff --git a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go index 861daa3207..e60e0ee97b 100644 --- a/pkg/plugins/plugins.go +++ b/pkg/plugins/plugins.go @@ -78,12 +78,6 @@ type Plugin struct { handlersRun bool } -// BasePath returns the path to which all paths returned by the plugin are relative to. -// For v1 plugins, this always returns the host's root directory. -func (p *Plugin) BasePath() string { - return "/" -} - // Name returns the name of the plugin. func (p *Plugin) Name() string { return p.name diff --git a/pkg/plugins/plugins_linux.go b/pkg/plugins/plugins_linux.go new file mode 100644 index 0000000000..9c5a0b5632 --- /dev/null +++ b/pkg/plugins/plugins_linux.go @@ -0,0 +1,7 @@ +package plugins + +// BasePath returns the path to which all paths returned by the plugin are relative to. +// For v1 plugins, this always returns the host's root directory. +func (p *Plugin) BasePath() string { + return "/" +} diff --git a/pkg/plugins/plugins_windows.go b/pkg/plugins/plugins_windows.go new file mode 100644 index 0000000000..3c8d8feb83 --- /dev/null +++ b/pkg/plugins/plugins_windows.go @@ -0,0 +1,8 @@ +package plugins + +// BasePath returns the path to which all paths returned by the plugin are relative to. +// For Windows v1 plugins, this returns an empty string, since the plugin is already aware +// of the absolute path of the mount. +func (p *Plugin) BasePath() string { + return "" +}