As fsp->is_directory is already correctly populated by our callers, we can drop
the complicated and possibly broken logic that relies on O_DIRECTORY being
defined.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
char *parent_dir = NULL;
struct smb_filename parent_dir_fname = {0};
const char *final_component = NULL;
- bool is_directory = false;
bool ok;
-#ifdef O_DIRECTORY
- if (flags & O_DIRECTORY) {
- is_directory = true;
- }
-#endif
-
- if (is_directory) {
+ if (fsp->is_directory) {
parent_dir = talloc_strdup(talloc_tos(), smb_fname->base_name);
if (parent_dir == NULL) {
saved_errno = errno;