mirror of
https://github.com/ksherlock/gopher.git
synced 2024-06-02 02:41:33 +00:00
directory error
This commit is contained in:
parent
b92f24697c
commit
b2cdd5d879
15
smb.c
15
smb.c
|
@ -927,14 +927,21 @@ static int open_and_read(Word ipid, const uint16_t *path)
|
||||||
responsePtr = *(smb_response **)h;
|
responsePtr = *(smb_response **)h;
|
||||||
|
|
||||||
status = responsePtr->header.status;
|
status = responsePtr->header.status;
|
||||||
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
|
|
||||||
|
switch(status)
|
||||||
{
|
{
|
||||||
|
case STATUS_OBJECT_NAME_NOT_FOUND:
|
||||||
|
case STATUS_NO_SUCH_FILE:
|
||||||
fprintf(stderr, "File not found\n");
|
fprintf(stderr, "File not found\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
if (status)
|
case STATUS_FILE_IS_A_DIRECTORY:
|
||||||
{
|
fprintf(stderr, "File is a directory\n");
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
default:
|
||||||
fprintf(stderr, "Open error: %08lx\n", status);
|
fprintf(stderr, "Open error: %08lx\n", status);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
file_id[0] = responsePtr->body.create.file_id[0];
|
file_id[0] = responsePtr->body.create.file_id[0];
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#define STATUS_OBJECT_NAME_INVALID 0xC0000033
|
#define STATUS_OBJECT_NAME_INVALID 0xC0000033
|
||||||
#define STATUS_OBJECT_NAME_NOT_FOUND 0xC0000034
|
#define STATUS_OBJECT_NAME_NOT_FOUND 0xC0000034
|
||||||
#define STATUS_OBJECT_NAME_COLLISION 0xC0000035
|
#define STATUS_OBJECT_NAME_COLLISION 0xC0000035
|
||||||
|
#define STATUS_FILE_IS_A_DIRECTORY 0xC00000BA
|
||||||
#define STATUS_FILE_CLOSED 0xC0000128
|
#define STATUS_FILE_CLOSED 0xC0000128
|
||||||
#define STATUS_NO_USER_SESSION_KEY 0xC0000202
|
#define STATUS_NO_USER_SESSION_KEY 0xC0000202
|
||||||
#define STATUS_USER_SESSION_DELETED 0xC0000203
|
#define STATUS_USER_SESSION_DELETED 0xC0000203
|
||||||
|
|
Loading…
Reference in New Issue
Block a user