Skip to content

Commit 29008b1

Browse files
committed
修复当编辑目标文件夹末尾带/时无法访问不带/的路径
1 parent d070755 commit 29008b1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bash/webdav/client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ func (c *Client) Targets() []string {
205205
if !strings.HasPrefix(fullpath, "/") {
206206
fullpath = filepath.Join(c.PWD, fullpath)
207207
}
208+
if stat.IsDir() {
209+
fullpath = strings.TrimSuffix(fullpath, "/")
210+
}
208211
targets = append(targets, fullpath)
209212
}
210213
}

0 commit comments

Comments
 (0)