Skip to content
Snippets Groups Projects
Commit 09db770d authored by deuce's avatar deuce
Browse files

Fix dropfile search/usernmae prompting

parent 947e1f5e
No related branches found
No related tags found
No related merge requests found
......@@ -2218,21 +2218,24 @@ malloc_error:
#ifndef ODPLAT_WIN32
#ifdef ODPLAT_NIX
od_control.od_com_method=COM_STDIO;
od_control.baud=300;
gethostname(od_control.system_name,sizeof(od_control.system_name));
od_control.system_name[sizeof(od_control.system_name)-1]=0;
if (isatty(fileno(stdin))) {
tcgetattr(fileno(stdin),&term);
od_control.baud=cfgetispeed(&term);
if(!od_control.baud)
od_control.baud=cfgetispeed(&term);
if(!od_control.baud)
od_control.baud=300;
if(bPromptForUserName)
{
od_control.od_com_method=COM_STDIO;
od_control.baud=300;
gethostname(od_control.system_name,sizeof(od_control.system_name));
od_control.system_name[sizeof(od_control.system_name)-1]=0;
if (isatty(fileno(stdin))) {
tcgetattr(fileno(stdin),&term);
od_control.baud=cfgetispeed(&term);
if(!od_control.baud)
od_control.baud=cfgetispeed(&term);
if(!od_control.baud)
od_control.baud=300;
}
uinfo=getpwuid(getuid());
ODStringCopy(od_control.user_handle, uinfo->pw_name,sizeof(od_control.user_handle));
ODStringCopy(od_control.user_name, uinfo->pw_gecos,sizeof(od_control.user_name));
}
uinfo=getpwuid(getuid());
ODStringCopy(od_control.user_handle, uinfo->pw_name,sizeof(od_control.user_handle));
ODStringCopy(od_control.user_name, uinfo->pw_gecos,sizeof(od_control.user_name));
#else
if(bPromptForUserName)
{
......
......@@ -1127,6 +1127,8 @@ tODResult ODDirRead(tODDirHandle hDir, tODDirEntry *pDirEntry)
pDirEntry->wAttributes |= DIR_ATTRIB_RDONLY;
if(!st.st_mode & S_IRUSR)
pDirEntry->wAttributes |= DIR_ATTRIB_SYSTEM;
pDirEntry->LastWriteTime=st.st_mtime;
pDirEntry->dwFileSize=st.st_size;
pDirInfo->pos++;
if(pDirInfo->pos==pDirInfo->g.gl_pathc)
pDirInfo->bEOF=TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment