fixing open a file as a directory
we should map this failure to STATUS_NOT_A_DIRECTORY notepad.exe had been known to do this
This commit is contained in:
parent
1a00a0bdce
commit
d1a05c810e
2 changed files with 2 additions and 1 deletions
|
|
@ -507,7 +507,7 @@ static int handle_open(nfs41_upcall *upcall)
|
||||||
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
|
#ifdef NOTEPAD_OPEN_FILE_AS_DIRFILE_FIXED
|
||||||
status = ERROR_ACCESS_DENIED;
|
status = ERROR_BAD_FILE_TYPE;
|
||||||
goto out_free_state;
|
goto out_free_state;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3277,6 +3277,7 @@ NTSTATUS map_open_errors(
|
||||||
case ERROR_REPARSE: return STATUS_REPARSE;
|
case ERROR_REPARSE: return STATUS_REPARSE;
|
||||||
case ERROR_TOO_MANY_LINKS: return STATUS_TOO_MANY_LINKS;
|
case ERROR_TOO_MANY_LINKS: return STATUS_TOO_MANY_LINKS;
|
||||||
case ERROR_DIRECTORY: return STATUS_FILE_IS_A_DIRECTORY;
|
case ERROR_DIRECTORY: return STATUS_FILE_IS_A_DIRECTORY;
|
||||||
|
case ERROR_BAD_FILE_TYPE: return STATUS_NOT_A_DIRECTORY;
|
||||||
default:
|
default:
|
||||||
print_error("[ERROR] nfs41_Create: upcall returned %d returning "
|
print_error("[ERROR] nfs41_Create: upcall returned %d returning "
|
||||||
"STATUS_INSUFFICIENT_RESOURCES\n", status);
|
"STATUS_INSUFFICIENT_RESOURCES\n", status);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue