mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-02 10:38:25 +00:00
Do not allow renaming to a non-empty directory (#1604)
Found via pjdfstests. References #1589.
This commit is contained in:
parent
9645d57c05
commit
3663082a01
@ -1545,6 +1545,9 @@ static int s3fs_rename(const char* _from, const char* _to)
|
||||
if(0 != (result = get_object_attribute(from, &buf, NULL))){
|
||||
return result;
|
||||
}
|
||||
if(0 != (result = directory_empty(to))){
|
||||
return result;
|
||||
}
|
||||
|
||||
// flush pending writes if file is open
|
||||
{ // scope for AutoFdEntity
|
||||
|
Loading…
x
Reference in New Issue
Block a user