mirror of
https://github.com/openziti/zrok.git
synced 2025-01-08 23:20:04 +01:00
small semantics tweaks in synchronizer framework (#438)
This commit is contained in:
parent
16ddb0a1f5
commit
b65d785881
@ -36,7 +36,6 @@ func Synchronize(src, dst Target) error {
|
||||
}
|
||||
|
||||
for _, copyPath := range copyList {
|
||||
logrus.Infof("copyPath: '%v' (%t)", copyPath.Path, copyPath.IsDir)
|
||||
if copyPath.IsDir {
|
||||
if err := dst.Mkdir(copyPath.Path); err != nil {
|
||||
return err
|
||||
|
@ -55,8 +55,10 @@ func (t *ZrokTarget) Inventory() ([]*Object, error) {
|
||||
}
|
||||
|
||||
if !rootFi.IsDir {
|
||||
base := filepath.Base(t.cfg.URL.Path)
|
||||
t.cfg.URL.Path = filepath.Dir(t.cfg.URL.Path)
|
||||
return []*Object{{
|
||||
Path: t.cfg.URL.Path,
|
||||
Path: "/" + base,
|
||||
IsDir: false,
|
||||
Size: rootFi.Size,
|
||||
Modified: rootFi.ModTime,
|
||||
|
Loading…
Reference in New Issue
Block a user