notepad specific fixes
removing notepad opens file as a directory ifdef for volume query notepad supplies insufficient buffer space but doesn't like buffer_too_small error code. it seems to be fine with partial buffer filled and buffer_overflow error.
This commit is contained in:
parent
f89ded9bf6
commit
735784e85b
2 changed files with 3 additions and 4 deletions
|
|
@ -507,10 +507,8 @@ static int handle_open(nfs41_upcall *upcall)
|
||||||
if (args->create_opts & FILE_DIRECTORY_FILE) {
|
if (args->create_opts & FILE_DIRECTORY_FILE) {
|
||||||
eprintf("trying to open file %s as a directory\n",
|
eprintf("trying to open file %s as a directory\n",
|
||||||
state->path.path);
|
state->path.path);
|
||||||
#ifdef NOTEPAD_OPEN_FILE_AS_DIRFILE_FIXED
|
|
||||||
status = ERROR_BAD_FILE_TYPE;
|
status = ERROR_BAD_FILE_TYPE;
|
||||||
goto out_free_state;
|
goto out_free_state;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else if (info.type == NF4LNK) {
|
} else if (info.type == NF4LNK) {
|
||||||
dprintf(2, "handle nfs41_open: SYMLINK\n");
|
dprintf(2, "handle nfs41_open: SYMLINK\n");
|
||||||
|
|
|
||||||
|
|
@ -4082,8 +4082,9 @@ NTSTATUS nfs41_QueryVolumeInformation(
|
||||||
RxContext->Info.LengthRemaining -= DevExt->VolAttrsLen;
|
RxContext->Info.LengthRemaining -= DevExt->VolAttrsLen;
|
||||||
status = STATUS_SUCCESS;
|
status = STATUS_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
RxContext->InformationToReturn = DevExt->VolAttrsLen;
|
RtlCopyMemory(RxContext->Info.Buffer, DevExt->VolAttrs,
|
||||||
status = STATUS_BUFFER_TOO_SMALL;
|
RxContext->Info.LengthRemaining);
|
||||||
|
status = STATUS_BUFFER_OVERFLOW;
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
case FileFsDeviceInformation:
|
case FileFsDeviceInformation:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue