From 22a07a12d2cc89abc66f100ffb4356439eaa1614 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 15 Mar 2021 20:46:25 -0700 Subject: [PATCH] [mount] [regression] `filer.path` option results in empty mount in 2.32 fix https://github.com/chrislusf/seaweedfs/issues/1906 --- weed/filesys/dir.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 6168425af..dc208dcbb 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -552,5 +552,8 @@ func (dir *Dir) saveEntry() error { } func (dir *Dir) FullPath() string { - return string(dir.entry.FullPath) + if dir.wfs.option.FilerMountRootPath == "/" { + return string(dir.entry.FullPath) + } + return string(dir.entry.FullPath)[len(dir.wfs.option.FilerMountRootPath):] }