winfsp unit tests and fixes
This commit is contained in:
@@ -166,10 +166,9 @@ auto winfsp_drive::CanDelete(PVOID /*file_node*/, PVOID file_desc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
api_path = file->get_api_path();
|
api_path = file->get_api_path();
|
||||||
if (file->is_directory()) {
|
if (file->is_directory() &&
|
||||||
return handle_error(provider_.get_directory_item_count(api_path) == 0U
|
provider_.get_directory_item_count(api_path) != 0U) {
|
||||||
? api_error::success
|
return handle_error(api_error::directory_not_empty);
|
||||||
: api_error::directory_not_empty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return handle_error(api_error::success);
|
return handle_error(api_error::success);
|
||||||
@@ -422,6 +421,7 @@ auto winfsp_drive::GetFileInfo(PVOID /*file_node*/, PVOID file_desc,
|
|||||||
return handle_error(api_error::invalid_handle);
|
return handle_error(api_error::invalid_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api_path = file->get_api_path();
|
||||||
return handle_error(api_error::success);
|
return handle_error(api_error::success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user