Fixes #1062, ESXi Driver supports PACKER_CACHE_DIR
This commit is contained in:
parent
c1cfd1da46
commit
6dc858e6cf
|
@ -260,10 +260,8 @@ func (d *ESX5Driver) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *ESX5Driver) datastorePath(path string) string {
|
func (d *ESX5Driver) datastorePath(path string) string {
|
||||||
if filepath.IsAbs(path) {
|
baseDir := filepath.Base(filepath.Dir(path))
|
||||||
return filepath.Join("/vmfs/volumes", d.Datastore, strings.Replace(path, "/", "", 1))
|
return filepath.Join("/vmfs/volumes", d.Datastore, baseDir, filepath.Base(path))
|
||||||
}
|
|
||||||
return filepath.Join("/vmfs/volumes", d.Datastore, path)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *ESX5Driver) connect() error {
|
func (d *ESX5Driver) connect() error {
|
||||||
|
|
Loading…
Reference in New Issue