From af5835d5fdfab19e84aec94c6c4ef56f30b1f46e Mon Sep 17 00:00:00 2001 From: idawnlight Date: Fri, 1 Dec 2023 23:15:04 +0800 Subject: [PATCH] fix(btrfs): correct relative path --- worker/btrfs_snapshot_hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/btrfs_snapshot_hook.go b/worker/btrfs_snapshot_hook.go index 36c87bf..5dbf827 100644 --- a/worker/btrfs_snapshot_hook.go +++ b/worker/btrfs_snapshot_hook.go @@ -229,7 +229,7 @@ func (h *btrfsSnapshotHook) postSuccess() error { workingDir := h.config.mirrorWorkingDir newSnapshot := h.config.NewSnapshotName() newSnapshotPath := filepath.Join(h.config.mirrorSnapshotDir, newSnapshot) - relativePath, err := filepath.Rel(h.config.mirrorServeDir, newSnapshotPath) + relativePath, err := filepath.Rel(filepath.Dir(h.config.mirrorServeDir), newSnapshotPath) if err != nil { return err }