WCHAR* fullpath;
size_t base_path_length;
- if (!base_path || !path)
+ if (!base_path || (!path && (PathLength > 0)))
return NULL;
base_path_length = _wcslen(base_path) * 2;
{
DRIVE_FILE* file;
- if (!base_path || !path)
+ if (!base_path || (!path && (PathLength > 0)))
return NULL;
file = (DRIVE_FILE*)calloc(1, sizeof(DRIVE_FILE));
UINT32 CreateOptions;
UINT32 PathLength;
UINT64 allocationSize;
- const WCHAR* path = NULL;
+ const WCHAR* path;
if (!drive || !irp || !irp->devman || !irp->Complete)
return ERROR_INVALID_PARAMETER;
if (Stream_GetRemainingLength(irp->input) < PathLength)
return ERROR_INVALID_DATA;
- if (PathLength > 0)
- path = (const WCHAR*)Stream_Pointer(irp->input);
+ path = (const WCHAR*)Stream_Pointer(irp->input);
FileId = irp->devman->id_sequence++;
file = drive_file_new(drive->path, path, PathLength, FileId, DesiredAccess, CreateDisposition,
CreateOptions, FileAttributes, SharedAccess);