We now check in bfs_rename() if the new name is the same as the old name
in the same directory - in this case, we will return B_OK (as nothing has to be done to fulfill the request), instead of B_BAD_VALUE which would be thrown later in the process. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2400 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -991,6 +991,10 @@ bfs_rename(void *_ns, void *_oldDir, const char *oldName, void *_newDir, const c
|
|||||||
Inode *oldDirectory = (Inode *)_oldDir;
|
Inode *oldDirectory = (Inode *)_oldDir;
|
||||||
Inode *newDirectory = (Inode *)_newDir;
|
Inode *newDirectory = (Inode *)_newDir;
|
||||||
|
|
||||||
|
// are we already done?
|
||||||
|
if (oldDirectory == newDirectory && !strcmp(oldName, newName))
|
||||||
|
return B_OK;
|
||||||
|
|
||||||
// get the directory's tree, and a pointer to the inode which should be changed
|
// get the directory's tree, and a pointer to the inode which should be changed
|
||||||
BPlusTree *tree;
|
BPlusTree *tree;
|
||||||
status_t status = oldDirectory->GetTree(&tree);
|
status_t status = oldDirectory->GetTree(&tree);
|
||||||
|
|||||||
Reference in New Issue
Block a user