Commit a7eeb6a6 authored by Brandon Heller's avatar Brandon Heller

vmware/iso: support hierarchical output directories

When providing a hierarchical output_directory value like
'transient/jenkins-slave', the VM would fail to build in the CreateDisk
step.  The properly created output directory would not match the location
provided to CreateDisk, since datastorePath() did not properly split such
paths.  Now this case works; tested hierarchical and singular
output_directory values.
parent 3a066d53
......@@ -311,8 +311,8 @@ func (d *ESX5Driver) String() string {
}
func (d *ESX5Driver) datastorePath(path string) string {
baseDir := filepath.Base(filepath.Dir(path))
return filepath.ToSlash(filepath.Join("/vmfs/volumes", d.Datastore, baseDir, filepath.Base(path)))
dirPath := filepath.Dir(path)
return filepath.ToSlash(filepath.Join("/vmfs/volumes", d.Datastore, dirPath, filepath.Base(path)))
}
func (d *ESX5Driver) cachePath(path string) string {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment