mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-15 18:30:10 -04:00
containerfs: rename doesn't rm src if dest is the same file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
78d72baaa4
commit
63a803540a
6
main.c
6
main.c
@ -2319,6 +2319,12 @@ lo_rename (fuse_req_t req, fuse_ino_t parent, const char *name,
|
|||||||
rm = hash_lookup (destpnode->children, &key);
|
rm = hash_lookup (destpnode->children, &key);
|
||||||
if (rm)
|
if (rm)
|
||||||
{
|
{
|
||||||
|
if (rm->ino == node->ino)
|
||||||
|
{
|
||||||
|
fuse_reply_err (req, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
hash_delete (destpnode->children, rm);
|
hash_delete (destpnode->children, rm);
|
||||||
if (rm->lookups > 0)
|
if (rm->lookups > 0)
|
||||||
node_free (rm);
|
node_free (rm);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user