diff --git a/request-example.go b/request-example.go
index <HASH>..<HASH> 100644
--- a/request-example.go
+++ b/request-example.go
@@ -83,6 +83,7 @@ func (fs *root) Filecmd(r *Request) error {
 			return &os.LinkError{Op: "rename", Old: r.Filepath, New: r.Target,
 				Err: fmt.Errorf("dest file exists")}
 		}
+		file.name = r.Target
 		fs.files[r.Target] = file
 		delete(fs.files, r.Filepath)
 	case "Rmdir", "Remove":
diff --git a/request-server_test.go b/request-server_test.go
index <HASH>..<HASH> 100644
--- a/request-server_test.go
+++ b/request-server_test.go
@@ -242,10 +242,11 @@ func TestRequestRename(t *testing.T) {
 	assert.Nil(t, err)
 	err = p.cli.Rename("/foo", "/bar")
 	assert.Nil(t, err)
-	_, err = r.fetch("/bar")
+	f, err := r.fetch("/bar")
+	assert.Equal(t, "bar", f.Name())
 	assert.Nil(t, err)
 	_, err = r.fetch("/foo")
-	assert.Equal(t, err, os.ErrNotExist)
+	assert.Equal(t, os.ErrNotExist, err)
 }
 
 func TestRequestRenameFail(t *testing.T) {
fix example request filesystem's file renaming

also added a test for the issue

Fixes #<I>