Commit 88fac0b4 authored by Israel Shirk's avatar Israel Shirk

Have nonesum run stat rather than nonesum because nonesum sums none. k.

parent fe0fde19
...@@ -396,11 +396,18 @@ func (d *ESX5Driver) upload(dst, src string) error { ...@@ -396,11 +396,18 @@ func (d *ESX5Driver) upload(dst, src string) error {
} }
func (d *ESX5Driver) verifyChecksum(ctype string, hash string, file string) bool { func (d *ESX5Driver) verifyChecksum(ctype string, hash string, file string) bool {
if (ctype == "none") {
err := d.sh("stat", file)
if err != nil {
return false
}
} else {
stdin := bytes.NewBufferString(fmt.Sprintf("%s %s", hash, file)) stdin := bytes.NewBufferString(fmt.Sprintf("%s %s", hash, file))
_, err := d.run(stdin, fmt.Sprintf("%ssum", ctype), "-c") _, err := d.run(stdin, fmt.Sprintf("%ssum", ctype), "-c")
if err != nil { if err != nil {
return false return false
} }
}
return true return true
} }
......
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