forked from KolibriOS/kolibrios
cmm: fixed bug with searching for input files.
git-svn-id: svn://kolibrios.org@9706 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
9d4f6fb10b
commit
f816b2a086
@ -174,10 +174,14 @@ SAVEREG *psavereg=&savereg;
|
|||||||
|
|
||||||
int loadfile(char *filename,int firstflag)
|
int loadfile(char *filename,int firstflag)
|
||||||
{
|
{
|
||||||
int hold;
|
int hold;
|
||||||
|
|
||||||
for(int i=0;i<=numfindpath;i++){
|
for(int i=0;i<=numfindpath;i++){
|
||||||
sprintf((char *)string2,"%s%s",findpath[(firstflag==0?i:numfindpath-i)],filename);
|
char *path = findpath[(firstflag==0?i:numfindpath-i)]; // FIXME! (íóæíî âûÿñíèòü, ïî÷åìó path ìîæåò áûòü ðàâåí "\0")
|
||||||
|
if(path && strlen(path)) {
|
||||||
|
sprintf((char *)string2,"%s%s", path, filename);
|
||||||
|
} else {
|
||||||
|
strcpy((char *)string2, filename);
|
||||||
|
}
|
||||||
#ifndef _WIN32_
|
#ifndef _WIN32_
|
||||||
for(char* p=(char *)string2; *p; ++p) if(*p=='\\') *p='/';
|
for(char* p=(char *)string2; *p; ++p) if(*p=='\\') *p='/';
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user