archive,hookfiles: convert paths to usr-merge when necessary (MR 39)
Co-authored-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"gitlab.com/postmarketOS/postmarketos-mkinitfs/internal/filelist"
|
||||
"gitlab.com/postmarketOS/postmarketos-mkinitfs/internal/misc"
|
||||
"gitlab.com/postmarketOS/postmarketos-mkinitfs/internal/osutil"
|
||||
)
|
||||
|
||||
type HookFiles struct {
|
||||
@@ -64,6 +65,9 @@ func slurpFiles(fd io.Reader) (*filelist.FileList, error) {
|
||||
}
|
||||
|
||||
src, dest, has_dest := strings.Cut(line, ":")
|
||||
if osutil.HasMergedUsr() {
|
||||
src = osutil.MergeUsr(src)
|
||||
}
|
||||
|
||||
fFiles, err := misc.GetFiles([]string{src}, true)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user