|
@@ -10,10 +10,11 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
type baseLayerWriter struct {
|
|
type baseLayerWriter struct {
|
|
- root string
|
|
|
|
- f *os.File
|
|
|
|
- bw *winio.BackupFileWriter
|
|
|
|
- err error
|
|
|
|
|
|
+ root string
|
|
|
|
+ f *os.File
|
|
|
|
+ bw *winio.BackupFileWriter
|
|
|
|
+ err error
|
|
|
|
+ hasUtilityVM bool
|
|
}
|
|
}
|
|
|
|
|
|
func (w *baseLayerWriter) closeCurrentFile() error {
|
|
func (w *baseLayerWriter) closeCurrentFile() error {
|
|
@@ -44,6 +45,10 @@ func (w *baseLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) (err e
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if filepath.ToSlash(name) == `UtilityVM/Files` {
|
|
|
|
+ w.hasUtilityVM = true
|
|
|
|
+ }
|
|
|
|
+
|
|
path := filepath.Join(w.root, name)
|
|
path := filepath.Join(w.root, name)
|
|
path, err = makeLongAbsPath(path)
|
|
path, err = makeLongAbsPath(path)
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -139,6 +144,13 @@ func (w *baseLayerWriter) Close() error {
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if w.hasUtilityVM {
|
|
|
|
+ err = ProcessUtilityVMImage(filepath.Join(w.root, "UtilityVM"))
|
|
|
|
+ if err != nil {
|
|
|
|
+ return err
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return w.err
|
|
return w.err
|
|
}
|
|
}
|