mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-12 23:46:30 +00:00
Fixed a bug about could not copy file mode from org file
This commit is contained in:
parent
6be3236b28
commit
1a96f40a10
11
src/s3fs.cpp
11
src/s3fs.cpp
@ -1561,6 +1561,17 @@ static int s3fs_chmod(const char* path, mode_t mode)
|
||||
return -EIO;
|
||||
}
|
||||
StatCache::getStatCacheData()->DelStat(nowcache);
|
||||
|
||||
// check opened file handle.
|
||||
//
|
||||
// If we have already opened file handle, should set mode to it.
|
||||
// And new mode is set when the file handle is closed.
|
||||
//
|
||||
FdEntity* ent;
|
||||
if(NULL != (ent = FdManager::get()->ExistOpen(path))){
|
||||
ent->SetMode(mode); // Set new mode to opened fd.
|
||||
FdManager::get()->Close(ent);
|
||||
}
|
||||
}
|
||||
S3FS_MALLOCTRIM(0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user