From d312c55bbed8ef69dc11bf024024c7b50f56f5b2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 4 Mar 2019 13:00:08 -0800 Subject: file path supports windows, avoiding back slashes fix https://github.com/chrislusf/seaweedfs/issues/868 --- weed/filesys/dir_rename.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'weed/filesys/dir_rename.go') diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index d29281f35..e18f67edc 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -41,7 +41,7 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector func moveEntry(ctx context.Context, client filer_pb.SeaweedFilerClient, oldParent string, entry *filer_pb.Entry, newParent, newName string) error { if entry.IsDirectory { - currentDirPath := filepath.Join(oldParent, entry.Name) + currentDirPath := filepath.ToSlash(filepath.Join(oldParent, entry.Name)) lastFileName := "" includeLastFile := false @@ -65,7 +65,7 @@ func moveEntry(ctx context.Context, client filer_pb.SeaweedFilerClient, oldParen for _, item := range resp.Entries { lastFileName = item.Name - err := moveEntry(ctx, client, currentDirPath, item, filepath.Join(newParent, newName), item.Name) + err := moveEntry(ctx, client, currentDirPath, item, filepath.ToSlash(filepath.Join(newParent, newName)), item.Name) if err != nil { return err } -- cgit v1.2.3