1.1 --- a/libfsserver/lib/generic/resource_registry.cc Thu Feb 17 00:37:13 2022 +0100
1.2 +++ b/libfsserver/lib/generic/resource_registry.cc Thu Feb 17 19:41:23 2022 +0100
1.3 @@ -207,6 +207,12 @@
1.4 if (err)
1.5 return err;
1.6
1.7 + /* Test for an empty directory.
1.8 + NOTE: A descriptive error should be communicated. */
1.9 +
1.10 + if (opening->accessing_directory(0, fileid) && !opening->directory_is_empty(fileid))
1.11 + return -L4_EIO;
1.12 +
1.13 /* Unlink the object regardless of whether it will be removed. */
1.14
1.15 err = opening->unlink_object(parent_fileid, fileid);