The CREATE_DIRECTORY, TRUNCATE_DIRECTORY, CREATE_SUBVOLUME,
CREATE_SUBVOLUME_INHERIT_QUOTA, CREATE_SUBVOLUME_NEW_QUOTA and
COPY_FILES branches in clean_item() called clean_item_instance()
but discarded its return value, always returning 0.
If dir_cleanup() fails (e.g. cannot stat a subdirectory), the error
is silently swallowed and the caller has no way to detect the failure.
The sibling EMPTY_DIRECTORY/IGNORE_PATH branches already propagate
the error correctly via glob_item().
Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
case CREATE_SUBVOLUME_INHERIT_QUOTA:
case CREATE_SUBVOLUME_NEW_QUOTA:
case COPY_FILES:
- clean_item_instance(c, i, i->path, CREATION_EXISTING);
- return 0;
+ return clean_item_instance(c, i, i->path, CREATION_EXISTING);
case EMPTY_DIRECTORY:
case IGNORE_PATH: