Skip to content
Snippets Groups Projects
Commit 11ed31dd authored by deuce's avatar deuce
Browse files

If there are no wildcard chars in the filename or ext of the entered path,

and enter was used to exit the field, and it is not a multi-select,
the entered filename is to be returned.  Otherwise, the filename is
considered to be a very restrictive mask.
parent 31d40696
Branches
Tags
No related merge requests found
...@@ -504,7 +504,7 @@ int filepick(uifcapi_t *api, char *title, struct file_pick *fp, char *dir, char ...@@ -504,7 +504,7 @@ int filepick(uifcapi_t *api, char *title, struct file_pick *fp, char *dir, char
sprintf(cfile,"%s%s%s%s",drive,tdir,fname,ext); sprintf(cfile,"%s%s%s%s",drive,tdir,fname,ext);
if(strchr(fname,'*') !=NULL || strchr(fname,'?') !=NULL if(strchr(fname,'*') !=NULL || strchr(fname,'?') !=NULL
|| strchr(ext,'*') !=NULL || strchr(ext,'?') !=NULL || strchr(ext,'*') !=NULL || strchr(ext,'?') !=NULL
|| !isdir(cfile)) { || (!isdir(cfile) && i!='\r' && i!='\n')) {
if(opts & UIFC_FP_MSKNOCHG) { if(opts & UIFC_FP_MSKNOCHG) {
sprintf(cfile,"%s%s%s",drive,tdir,cmsk); sprintf(cfile,"%s%s%s",drive,tdir,cmsk);
FREE_AND_NULL(tmplastpath); FREE_AND_NULL(tmplastpath);
...@@ -517,6 +517,10 @@ int filepick(uifcapi_t *api, char *title, struct file_pick *fp, char *dir, char ...@@ -517,6 +517,10 @@ int filepick(uifcapi_t *api, char *title, struct file_pick *fp, char *dir, char
} }
break; break;
} }
else {
if((opts & UIFC_FP_MULTI)!=UIFC_FP_MULTI && (i=='\r' || i!='\n'))
fieldmove=0;
}
if((currfield != CURRENT_PATH) || fieldmove) if((currfield != CURRENT_PATH) || fieldmove)
break; break;
if(isdir(cfile)) { if(isdir(cfile)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment