Merge from 1.4. Fix a missing file detection bug.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2838 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-09-13 05:32:17 +00:00
parent da572687e3
commit 2b2fc4c747

View File

@ -467,7 +467,10 @@ xaccResolveFilePath (const char * filefrag)
/* check for an absolute file path */
if ('/' == *filefrag) {
return (strdup (filefrag));
rc = stat (filefrag, &statbuf);
if ((!rc) && (S_ISREG(statbuf.st_mode)))
return (strdup (filefrag));
return NULL;
}
/* get conservative on the length so that sprintf(getpid()) works ... */