This commit is contained in:
parent
760753c7b8
commit
46e00f5521
2 changed files with 6 additions and 0 deletions
|
@ -2,13 +2,18 @@ package main
|
|||
|
||||
import (
|
||||
zord_tree "g.arns.lt/zordsdavini/zord-tree"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func Collect() {
|
||||
log.Println("Collect: start")
|
||||
if _, err := os.Stat(source); os.IsNotExist(err) {
|
||||
log.Print(err)
|
||||
panic("Source directory does not exist.")
|
||||
}
|
||||
|
||||
log.Println("Collect: pre")
|
||||
_ = zord_tree.PopulateTree(source, meta, customMeta)
|
||||
log.Println("Collect: post")
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ func (TreeManagerServer *server) GetFile(_ context.Context, in *FileRequest) (*F
|
|||
}
|
||||
|
||||
func (TreeManagerServer *server) RebuildTree(ctx context.Context, in *TreeSecret) (*RebuildResponse, error) {
|
||||
log.Println(in)
|
||||
success := false
|
||||
if in.Key == key {
|
||||
Collect()
|
||||
|
|
Loading…
Reference in a new issue