don't fail if you can't find abs or relative path.

This commit is contained in:
Megan Marsh 2018-07-23 09:54:08 -07:00
parent a5a6b1ab58
commit a2f5fbadf6
1 changed files with 4 additions and 2 deletions

View File

@ -147,12 +147,14 @@ func (c *ISOConfig) parseCheckSumFile(rd *bufio.Reader) error {
absPath, err := filepath.Abs(u.Path)
if err != nil {
return fmt.Errorf("Unable to generate absolute path from provided iso_url: %s", err)
log.Printf("Unable to generate absolute path from provided iso_url: %s", err)
absPath = ""
}
relpath, err := filepath.Rel(filepath.Dir(checksumurl.Path), absPath)
if err != nil {
return err
log.Printf("Unable to determine relative pathing; continuing with abspath.")
relpath = ""
}
filename := filepath.Base(u.Path)