diff options
Diffstat (limited to 'internal/plan')
| -rw-r--r-- | internal/plan/chain.go | 2 | ||||
| -rw-r--r-- | internal/plan/step.go | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/internal/plan/chain.go b/internal/plan/chain.go index 7c95d9b..f24bbfe 100644 --- a/internal/plan/chain.go +++ b/internal/plan/chain.go @@ -92,7 +92,7 @@ func Build(root string, in []Input, now time.Time, d Disk, claims *Claims) []Cha // buildOne builds the chain for a single file. claim is shared with every // other file processed by the same Build call. func buildOne(root string, in Input, now time.Time, d Disk, claim claimed) Chain { - c := Chain{File: in.File} + c := Chain{File: in.File, Root: root} cur := in.File.Path var deletedBy string diff --git a/internal/plan/step.go b/internal/plan/step.go index c613ce5..0b554d3 100644 --- a/internal/plan/step.go +++ b/internal/plan/step.go @@ -52,8 +52,15 @@ type Step struct { // Chain is one file's steps, in order. type Chain struct { - File scan.File - Steps []Step + File scan.File + Steps []Step + + // Root is the directory being sorted. Apply uses it to tell a + // destination inside that directory - where anything at all may have + // been written, by a download or an unpacked archive - from one the + // configuration named itself, which is the user's own arrangement. + Root string + Warnings []string } |
