mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix pluginv1 Windows volumes
c54b717
caused a regression for pluginv1 on Windows, where extraneous
backslashes were added to BasePath of the plugin. For pluginv1 on windows,
BasePath() should return an empty string, since the plugin is fully aware
of the mount path. Also, unlike Linux where all paths are relative to "/",
Windows paths are dependent on system drives and mapped drives.
Fixes #30148
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
This commit is contained in:
parent
27695cd751
commit
0ef21eb0e3
3 changed files with 15 additions and 6 deletions
|
@ -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
|
||||
|
|
7
pkg/plugins/plugins_linux.go
Normal file
7
pkg/plugins/plugins_linux.go
Normal file
|
@ -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 "/"
|
||||
}
|
8
pkg/plugins/plugins_windows.go
Normal file
8
pkg/plugins/plugins_windows.go
Normal file
|
@ -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 ""
|
||||
}
|
Loading…
Reference in a new issue