Put path back into a file

This commit is contained in:
Josh Fyne 2017-02-16 13:38:57 -05:00
parent e8ba09d0c5
commit bd817ea890
1 changed files with 6 additions and 1 deletions

View File

@ -27,7 +27,12 @@ func OpenFile(filename string) (*File, error) {
return nil, err
}
defer file.Close()
return OpenReader(file)
f, err := OpenReader(file)
if err != nil {
return nil, err
}
f.Path = filename
return f, nil
}
// OpenReader take an io.Reader and return a populated XLSX file.