mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 10:31:35 +00:00
Only create metadata if file is non-zero sized
The recent iso9660wrap vendoring bump means this does now work, but it seems pointless in this case so skip. Relates to https://github.com/linuxkit/kubernetes/issues/4 Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
a5e5d42368
commit
cef9d11f58
@ -262,8 +262,10 @@ func CreateMetadataISO(state, data string) ([]string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var d []byte
|
var d []byte
|
||||||
if _, err := os.Stat(data); os.IsNotExist(err) {
|
if st, err := os.Stat(data); os.IsNotExist(err) {
|
||||||
d = []byte(data)
|
d = []byte(data)
|
||||||
|
} else if st.Size() == 0 {
|
||||||
|
return []string{}, nil
|
||||||
} else {
|
} else {
|
||||||
d, err = ioutil.ReadFile(data)
|
d, err = ioutil.ReadFile(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user