mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-03 11:08:26 +00:00
Merge pull request #1302 from gaul/rename/nocopy
Fix renames of open files with nocopyapi option
This commit is contained in:
commit
0f5db0d1bf
@ -2805,7 +2805,7 @@ void FdManager::Rename(const std::string &from, const std::string &to)
|
|||||||
// rename path and caches in fd entity
|
// rename path and caches in fd entity
|
||||||
string fentmapkey;
|
string fentmapkey;
|
||||||
if(!ent->RenamePath(to, fentmapkey)){
|
if(!ent->RenamePath(to, fentmapkey)){
|
||||||
S3FS_PRN_ERR("Failed to rename FdEntity obejct for %s to %s", from.c_str(), to.c_str());
|
S3FS_PRN_ERR("Failed to rename FdEntity object for %s to %s", from.c_str(), to.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1373,6 +1373,8 @@ static int rename_object_nocopy(const char* from, const char* to)
|
|||||||
FdManager::get()->Close(ent);
|
FdManager::get()->Close(ent);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FdManager::get()->Rename(from, to);
|
||||||
FdManager::get()->Close(ent);
|
FdManager::get()->Close(ent);
|
||||||
|
|
||||||
// Remove file
|
// Remove file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user